2

The app crashes on both emulators and my android phone, this only started occurring after loading the latest Android Studio update a few days ago. A copy of the logcat is below. Would appreciate any ideas on what might fix this problem, I am just learning how to code and don't know how to go about solving this issue.

04-07 00:03:19.528 18645-18645/com.example.android.justjava E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.android.justjava, PID: 18645
    java.lang.RuntimeException: Unable to get provider com.android.tools.ir.server.InstantRunContentProvider: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.ir.server.InstantRunContentProvider" on path: DexPathList[[zip file "/data/app/com.example.android.justjava-36.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.justjava-36, /vendor/lib, /system/lib]]
        at android.app.ActivityThread.installProvider(ActivityThread.java:5355)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4930)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4870)
        at android.app.ActivityThread.access$1600(ActivityThread.java:174)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1385)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:146)
        at android.app.ActivityThread.main(ActivityThread.java:5752)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
        at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.ir.server.InstantRunContentProvider" on path: DexPathList[[zip file "/data/app/com.example.android.justjava-36.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.android.justjava-36, /vendor/lib, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
        at android.app.ActivityThread.installProvider(ActivityThread.java:5340)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4930) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4870) 
        at android.app.ActivityThread.access$1600(ActivityThread.java:174) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1385) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:146) 
        at android.app.ActivityThread.main(ActivityThread.java:5752) 
        at java.lang.reflect.Method.invokeNative(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:515) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) 
        at dalvik.system.NativeStart.main(Native Method) 
Masoom Badi
  • 986
  • 9
  • 18
Armadillo
  • 21
  • 3
  • 1
    You could attempt to turn off the instant run within the preference settings (you can use the search for it) and see if that is what is causing your issue. I believe after the update, I needed to remove my .gradle folder and let it re-download the missing components when I reloaded the app. – Jay Snayder Apr 06 '18 at 16:39
  • Thanks for answering my query! I have turned off the instant run and it still doesn't work. I have found the .gradle folder in the AndroidStudioProjects folder, so should I try deleting it and running the app again? – Armadillo Apr 06 '18 at 17:16
  • I deleted the .gradle folder and run the app again but it is still crashing with the same message "Just Java (my app name) has stopped". – Armadillo Apr 06 '18 at 18:01
  • have a look here. https://stackoverflow.com/questions/45672340/android-classnotfoundexception-while-class-is-present/45672463 – Masoom Badi Apr 07 '18 at 21:39

0 Answers0