Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I've got this error and tried some solutions I found here but they didn't work.

I don't know why and how to solve this. Please help.

Android Studio 2.1.2

07-12 18:28:46.742 642-642/com.vuforia.samples.VuforiaSamples E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.vuforia.samples.VuforiaSamples, PID: 642
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 "/data/app/com.vuforia.samples.VuforiaSamples-2/base.apk"],nativeLibraryDirectories=[/data/app/com.vuforia.samples.VuforiaSamples-2/lib/arm, /data/app/com.vuforia.samples.VuforiaSamples-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
    at android.app.LoadedApk.makeApplication(LoadedApk.java:676)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6294)
    at android.app.ActivityThread.access$1800(ActivityThread.java:222)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1861)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:158)
    at android.app.ActivityThread.main(ActivityThread.java:7229)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/data/app/com.vuforia.samples.VuforiaSamples-2/base.apk"],nativeLibraryDirectories=[/data/app/com.vuforia.samples.VuforiaSamples-2/lib/arm, /data/app/com.vuforia.samples.VuforiaSamples-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    at android.app.Instrumentation.newApplication(Instrumentation.java:1004)
    at android.app.LoadedApk.makeApplication(LoadedApk.java:666)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6294)        at android.app.ActivityThread.access$1800(ActivityThread.java:222) 
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1861) 
    at android.os.Handler.dispatchMessage(Handler.java:102) 
    at android.os.Looper.loop(Looper.java:158) 
    at android.app.ActivityThread.main(ActivityThread.java:7229) 
    at java.lang.reflect.Method.invoke(Native Method) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 

Suppressed: java.lang.ClassNotFoundException: com.android.tools.fd.runtime.BootstrapApplication
    at java.lang.Class.classForName(Native Method)
    at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
    at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
    ... 12 more

Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
like image 625
Nao Ikeda Avatar asked Jul 13 '16 10:07

Nao Ikeda


1 Answers

After a few search i came up this sollution, Its because of the android studio tries to instant run. to turn off this feature

  • Go to file
  • click setting
  • select Build,Execution development on left
  • side menu disable instant run to hotswap by unchecking it.
  • select apply and its all done

enter image description here

setting Secreenshot for reference. Thanks hopefully it may help you.

like image 196
yubaraj poudel Avatar answered Oct 20 '22 15:10

yubaraj poudel