Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication ?Android

Internet of Things IoT Frameworks 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ I updated my Android Studio to version 2.0. But I had a problem, I don't know why? The important error info: Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication: java.lang.IllegalStateException: java.lang.ClassNotFoundException: com.eallcn.rentagent.MyDebugEallApplication I searched a long time, But I didn't find the right answer you can see the link At the same time when I click File->Project structure It shows this error: Is there any problem somewhere in the libs? When gradle build the program the libs didn't load completely for current program. Is there any problem with Android Studio version 2.0? When I use Android studio 1.4.0 to build and run the program. It works fine for me! But when I use the Android Studio 2.0, the problem shows up! Why? Could you help me, please? Here is detailed error log: 11-28 11:57:00.489 19890-19890/com.eallcn.rentagent.debug E/AndroidRuntime: FATAL EXCEPTION: main Process: com.eallcn.rentagent.debug, PID: 19890 java.lang.RuntimeException: Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication: java.lang.IllegalStateException: java.lang.ClassNotFoundException: com.eallcn.rentagent.MyDebugEallApplication at android.app.LoadedApk.makeApplication(LoadedApk.java:537) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4586) at android.app.ActivityThread.access$1800(ActivityThread.java:139) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5314) 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:864) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: java.lang.ClassNotFoundException: com.eallcn.rentagent.MyDebugEallApplication at com.android.tools.fd.runtime.BootstrapApplication.createRealApplication(BootstrapApplication.java:167) at com.android.tools.fd.runtime.BootstrapApplication.attachBaseContext(BootstrapApplication.java:179) at android.app.Application.attach(Application.java:194) at android.app.Instrumentation.newApplication(Instrumentation.java:992) at android.app.Instrumentation.newApplication(Instrumentation.java:976) at android.app.LoadedApk.makeApplication(LoadedApk.java:532) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4586)  at android.app.ActivityThread.access$1800(ActivityThread.java:139)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5314)  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:864)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.ClassNotFoundException: com.eallcn.rentagent.MyDebugEallApplication at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:251) at java.lang.Class.forName(Class.java:216) at com.android.tools.fd.runtime.BootstrapApplication.createRealApplication(BootstrapApplication.java:155) at com.android.tools.fd.runtime.BootstrapApplication.attachBaseContext(BootstrapApplication.java:179)  at android.app.Application.attach(Application.java:194)  at android.app.Instrumentation.newApplication(Instrumentation.java:992)  at android.app.Instrumentation.newApplication(Instrumentation.java:976)  at android.app.LoadedApk.makeApplication(LoadedApk.java:532)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4586)  at android.app.ActivityThread.access$1800(ActivityThread.java:139)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5314)  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:864)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.NoClassDefFoundError: com/eallcn/rentagent/MyDebugEallApplication at java.lang.Class.classForName(Native Method)  at java.lang.Class.forName(Class.java:251)  at java.lang.Class.forName(Class.java:216)  at com.android.tools.fd.runtime.BootstrapApplication.createRealApplication(BootstrapApplication.java:155)  at com.android.tools.fd.runtime.BootstrapApplication.attachBaseContext(BootstrapApplication.java:179)  at android.app.Application.attach(Application.java:194)  at android.app.Instrumentation.newApplication(Instrumentation.java:992)  at android.app.Instrumentation.newApplication(Instrumentation.java:976)  at android.app.LoadedApk.makeApplication(LoadedApk.java:532)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4586)  at android.app.ActivityThread.access$1800(ActivityThread.java:139)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5314)  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:864)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.ClassNotFoundException: Didn't find class "com.eallcn.rentagent.MyDebugEallApplication" on path: DexPathList[[zip file "/data/app/com.eallcn.rentagent.debug-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.eallcn.rentagent.debug-1, /vendor/lib, /system/lib, /data/datalib]] 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 java.lang.Class.classForName(Native Method)  at java.lang.Class.forName(Class.java:251)  at java.lang.Class.forName(Class.java:216)  at com.android.tools.fd.runtime.BootstrapApplication.createRealApplication(BootstrapApplication.java:155)  at com.android.tools.fd.runtime.BootstrapApplication.attachBaseContext(BootstrapApplication.java:179)  at android.app.Application.attach(Application.java:194)  at android.app.Instrumentation.newApplication(Instrumentation.java:992)  at android.app.Instrumentation.newApplication(Instrumentation.java:976)  at android.app.LoadedApk.makeApplication(LoadedApk.java:532)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4586)  at android.app.ActivityThread.access$1800(ActivityThread.java:139)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5314)  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:864)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)  at dalvik.system.NativeStart.main(Native Method)  

Posted on 16 Aug 2022, this text provides information on IoT Frameworks related to Internet of Things. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ Disable the Instant Run option in Android Studio. Instructions are in the Android Studio Instant Run documentation. Instant Run tries to do hot swapping of your code; this causes the application class to be moved. To disable Instant Run Go to File --> Settings--> Build,Execution,Deployment -->Instant Run ---> uncheck "Enable instant run"

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Important Internet of Things Links

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community