java - 获取错误 "java.lang.NoClassDefFoundError: com.android.tools.fd.runtime.AppInfo"

标签 java android noclassdeffounderror

当我启动应用程序时出现此错误

FATAL EXCEPTION: main
                                                     java.lang.NoClassDefFoundError: com.android.tools.fd.runtime.AppInfo
                                                         at com.android.tools.fd.runtime.BootstrapApplication.attachBaseContext(BootstrapApplication.java:229)
                                                         at android.app.Application.attach(Application.java:181)
                                                         at android.app.Instrumentation.newApplication(Instrumentation.java:991)
                                                         at android.app.Instrumentation.newApplication(Instrumentation.java:975)
                                                         at android.app.LoadedApk.makeApplication(LoadedApk.java:504)
                                                         at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4417)
                                                         at android.app.ActivityThread.access$1300(ActivityThread.java:141)
                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
                                                         at android.os.Handler.dispatchMessage(Handler.java:99)
                                                         at android.os.Looper.loop(Looper.java:137)
                                                         at android.app.ActivityThread.main(ActivityThread.java:5103)
                                                         at java.lang.reflect.Method.invokeNative(Native Method)
                                                         at java.lang.reflect.Method.invoke(Method.java:525)
                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
                                                         at dalvik.system.NativeStart.main(Native Method)

最佳答案

禁用 Instant Run,删除构建文件夹,然后重建项目。看看能不能用

关于java - 获取错误 "java.lang.NoClassDefFoundError: com.android.tools.fd.runtime.AppInfo",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37046921/

相关文章:

java - 如何始终显示一周的最后一天

android - 什么是 Smali Code Android

Java异常: NoClassDefFoundError even if place the jar files into classpath correctly

java - NoClassDefFoundError 位于 edu/knowitall/openie/openIECli

java - 对象作为数组

java - 客观化 4 过滤器不起作用

Android:通过改造在ApiService中选择一部分response json

android - CoordinatorLayout 推送的 Actionbar

apache - 这个NoClassDefFoundError 应该怎么办?

java - 使用 Maven 继承和构建