java – 无法实例化应用程序com.android.tools.fd.runtime.BootstrapApplication

前端之家收集整理的这篇文章主要介绍了java – 无法实例化应用程序com.android.tools.fd.runtime.BootstrapApplication前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有这个错误并尝试了一些我在这里找到的解决方案,但它们没有用.

我不知道为什么以及如何解决这个问题.
请帮忙.

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"],/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

解决方法

经过几次搜索,我想出了这个解决方案,
它因为android工作室试图立即运行.
关闭功能

>转到档案
>点击设置
>选择左侧的构建,执行开发
>侧面菜单通过取消选中禁用即时运行到热交换.
>选择申请并全部完成

设置Secreenshot作为参考.谢谢,希望它可以帮助你.

原文链接:https://www.f2er.com/java/120758.html

猜你在找的Java相关文章