newrelic / newrelic-flutter-agent

New Relic agent SDK for Flutter hybrid mobile apps
Apache License 2.0
7 stars 12 forks source link

Newrelic.properties was not found! Mapping file for variant [devRelease] not uploaded. #98

Open ItsNotPat opened 2 weeks ago

ItsNotPat commented 2 weeks ago

I migrated my gradle from Gradle 7.3 to 8.0.

I encountered this problem with new relic.

Execution failed for task ':app:minifyReleaseWithR8'.

I found this Git Issue that fixed my problem. I added a proguard-rules.pro file in my app folder and also indicated it on my app level build.gradle

proguard-rules.pro

-dontwarn com.newrelic.agent.android.ndk.AgentNDK$Builder
-dontwarn com.newrelic.agent.android.ndk.AgentNDK
-dontwarn com.newrelic.agent.android.ndk.AgentNDKListener

-keep class org.apache.http.** { *; }
-dontwarn org.apache.http.**

-keep class com.squareup.okhttp.* { *; }
-dontwarn com.squareup.okhttp.**
-dontwarn okio.**

-keep class okhttp3.** { *; }
-dontwarn okhttp3.**
-dontwarn okio.**

-keep class retrofit2.** { *; }
-dontwarn retrofit2.** 

After I applied this fix I still encounter the newrelic.properties error.

ndesai-newrelic commented 1 week ago

@ItsNotPat did you add newrelic.properties file for your project?

nmpco129 commented 1 day ago

hello @ndesai-newrelic , do you have an example for newrelic.properties file? I can not find it in your example app on github. Thanks a lot