Search code examples
androidproguardnewrelic

Proguard config for newrelic in android app?


I'm not using new relic in my app and it still shows class not found error. Only solution that worked for me is to include new relic. I'm using eclipse.

App works in debug, now I want to use proguard and I'm new to it. What do I need to write in proguard-project.txt to include newrelic in proguard.

Thanks!


Solution

  • After some testing and researching, to launch an Android app with NewRelic and have ProGuard enabled, just copy and paste the following snippet in your proguard.cfg file (or if you have yours specified as proguard-properties.txt):

    -keep class com.newrelic.** { *; }
    -dontwarn com.newrelic.**
    -keepattributes Exceptions, Signature, InnerClasses
    

    Source