3

Help! I have an application on the Android store and one of my users recently reported a bug, but I am unable to find where the source of the error is. Here is the ANR report:

java.lang.RuntimeException: Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/mnt/asec/com.applicationcomp.myapplication-1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.applicationcomp.myapplication-1/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:516)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4580)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1290)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5299)
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:932)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:748)
at dalvik.system.NativeStart.main(Native Method)

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/mnt/asec/com.applicationcomp.myapplication-1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.applicationcomp.myapplication-1/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.Instrumentation.newApplication(Instrumentation.java:987)
at android.app.LoadedApk.makeApplication(LoadedApk.java:511)
... 11 more

Does anyone know that causes of these errors? This apparently is occurring as soon as the app is started up on an Android 4.4 device (I've also got another report of this happening on 4.2 as well).

*****IMPORTANT NOTE****** For some reason, this seems to only be occurring on some 4.4 devices, and unfortunately I am unable to replicate it in the Android Studio Emulator

2
  • There is a similar question answered here. Commented Sep 23, 2016 at 19:44
  • @eXirrah - that's about java.lang.IllegalStateException, while the current one is CNFE one. @Rick B - CNFE, not ANR )) Commented Sep 23, 2016 at 19:49

3 Answers 3

0

Look at https://code.google.com/p/android/issues/detail?id=199327 - seems that you enabled Instant Run feature and it causes that problem on Android 4 as it is not supported there (though it should not crash the app that rude of course, but it's probably a bug).

Try to build the app with Instant Run disabled.

According to https://medium.com/google-developers/instant-run-how-does-it-work-294a1633367f#.bo88mglpe Instant Run injects some code (App Server) into the app, who knows what may happen on Android 4 then ))

Sign up to request clarification or add additional context in comments.

3 Comments

Ok, I unchecked it. Any idea why this is only occurring on some 4.4 devices but not others?
It's hard to know for sure, probably Instant Run authors could give some light for it. As you can see from the bug the feature even causes problems on Android 6 devices where it should work. Just a guess - the feature has a run-time check and it tells it to enable Instant Run on devices where it doesn't actually work. Then the feature can't get proper support from native OS layer and crashes.
another example of a problem causing by Instant Run: stackoverflow.duapp.com/questions/36491692/…
0

check if the class that you're trying to start is register in your manifest. maybe it isn't and because of that you get this error. hope it will work.

Comments

0

Android ClassNotFoundException: Didn't find class on path

It seems that it might be a conflict between android support library version and the library project

2 Comments

Doesn't the name of the class com.android.tools.fd.runtime.BootstrapApplication say something for you? It doesn't look like a user class you're trying to locale on ClassPath
If you follow the link I put you'll find some solutions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.