gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:46:17 26 4
gpt4 key购买 nike

我遇到了这个错误并尝试了我在这里找到的一些解决方案,但它们没有用。

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

安卓工作室 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

最佳答案

经过几次搜索,我想出了这个解决方案,这是因为 android studio 试图即时运行。关闭此功能

  • 转到文件
  • 点击设置
  • 选择左边的Build,Execution development
  • 侧面菜单通过取消选中禁用即时运行到热交换。
  • 选择应用并完成

enter image description here

设置截图供引用。谢谢希望它可以帮助你。

关于java - 无法实例化应用程序 com.android.tools.fd.runtime.BootstrapApplication,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38348665/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com