Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android - Didn't find class "com.newrelic.agent.android.instrumentation.okhttp3.OkHttp3Instrumentation" #12

Open
kslat3r opened this issue Apr 10, 2017 · 4 comments

Comments

@kslat3r
Copy link

kslat3r commented Apr 10, 2017

I have followed the installation instructions for Android to the letter and I receive the following crash report (ironically through New Relic) using the latest master branch code, react-native 0.42.0:

Didn't find class "com.newrelic.agent.android.instrumentation.okhttp3.OkHttp3Instrumentation" on path: DexPathList[[zip file "/data/app/com.spaces_whitelabel.mobile.peg-1/base.apk"],nativeLibraryDirectories=[/data/app/com.spaces_whitelabel.mobile.peg-1/lib/x86, /system/fake-libs, /data/app/com.spaces_whitelabel.mobile.peg-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]

Do let me know if you need any more debug/project-specific information.

Many thanks

@yuppieboy
Copy link

yuppieboy commented Aug 28, 2017

hi guys,did you solve the problem ? I meet the same problem. when I debug the project, this issue display. but <./gradlew clean installStagingRelease > can install the app and run successfully, it's so strange.

the following is detail error, I can't solve them ,it waste me lots of times, anyone can help me?thanks a lot.😊

FATAL EXCEPTION: main
Process: com.relictest, PID: 3478
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/newrelic/agent/android/instrumentation/okhttp3/OkHttp3Instrumentation;
at com.facebook.react.devsupport.DevServerHelper.isPackagerRunning(DevServerHelper.java:418)
at com.facebook.react.devsupport.DevSupportManagerImpl.isPackagerRunning(DevSupportManagerImpl.java:647)
at com.facebook.react.ReactInstanceManager.recreateReactContextInBackgroundInner(ReactInstanceManager.java:422)
at com.facebook.react.ReactInstanceManager.createReactContextInBackground(ReactInstanceManager.java:389)
at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:215)
at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:110)
at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:100)
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:54)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.newrelic.agent.android.instrumentation.okhttp3.OkHttp3Instrumentation" on path: DexPathList[[zip file "/data/app/com.relictest-1/base.apk"],nativeLibraryDirectories=[/data/app/com.relictest-1/lib/x86, /system/fake-libs, /data/app/com.relictest-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.facebook.react.devsupport.DevServerHelper.isPackagerRunning(DevServerHelper.java:418) 
at com.facebook.react.devsupport.DevSupportManagerImpl.isPackagerRunning(DevSupportManagerImpl.java:647) 
at com.facebook.react.ReactInstanceManager.recreateReactContextInBackgroundInner(ReactInstanceManager.java:422) 
at com.facebook.react.ReactInstanceManager.createReactContextInBackground(ReactInstanceManager.java:389) 
at com.facebook.react.ReactRootView.startReactApplication(ReactRootView.java:215) 
at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:110) 
at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:100) 
at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:54) 
at android.app.Activity.performCreate(Activity.java:6662) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707) 
at android.app.ActivityThread.-wrap12(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6077) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) 

@nickbreaton
Copy link

@yuppieboy Did you ever figure out a solution to this problem? I am having the same issue.

@yuppieboy
Copy link

yuppieboy commented Sep 6, 2017

@nickbreaton upgrade to latest version ,it works. my is v0.48.1 ,there is a pr open ,you can fork this repo and fix the issue yourself.

@nisargdesai15
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants