I get this exeption using New Relict com.newrelic.agent.android:android-agent:5.1.0, 5.1.1 or 5.0.0 and retrogit 1.9! Where can I report a bug in new relic? anyone with the same issue?
java.lang.IllegalAccessError: Method 'void com.squareup.okhttp.Call.(com.squareup.okhttp.OkHttpClient, com.squareup.okhttp.Request)' is inaccessible to class 'com.newrelic.agent.android.instrumentation.okhttp2.CallExtension' (declaration of 'com.newrelic.agent.android.instrumentation.okhttp2.CallExtension' appears in /data/app/com.thepickupnetwork.customer.app-2/base.apk)
at com.newrelic.agent.android.instrumentation.okhttp2.CallExtension.(CallExtension.java:32)
at com.newrelic.agent.android.instrumentation.okhttp2.OkHttp2Instrumentation.newCall(OkHttp2Instrumentation.java:28)
at retrofit.client.OkClient.execute(OkClient.java:53)
at com.newrelic.agent.android.instrumentation.retrofit.ClientExtension.execute(ClientExtension.java:42)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
at retrofit.RestAdapter$RestHandler$2.obtainResponse(RestAdapter.java:278)
at retrofit.CallbackRunnable.run(CallbackRunnable.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at retrofit.Platform$Android$2$1.run(Platform.java:142)
at java.lang.Thread.run(Thread.java:818)
A change in the scope of the OkHttp Call constructor in 2.4 breaks our instrumentation. A fix for this has been merged into OkHttp and will be fixed in release 2.5: https://github.com/square/okhttp/pull/1687
In the mean time, the two workarounds are to either use OkHttp 2.3 or use 2.5.0-SNAPSHOT from the Sonatype snapshot repo, like so:
Source: https://discuss.newrelic.com/t/bug-with-okhttp/25893