【问题标题】:i am using Android Studio 3.2v and i am getting this error when i run my main_activity我正在使用 Android Studio 3.2v,运行 main_activity 时出现此错误
【发布时间】:2019-03-05 15:11:43
【问题描述】:

任务 ':app:transformClassesWithInstantRunForDebug 执行失败

【问题讨论】:

  • 请更新您的 SDK 和 SDK 工具。
  • 这个答案可能会有所帮助stackoverflow.com/questions/38206640/…
  • @Young Soyinka : 试过了,还是不行
  • @Umang:一切都是最新的......
  • 尝试了几乎所有东西,但附件图像中显示的错误仍然存​​在..请帮助

标签: android android-studio


【解决方案1】:

NoClassDefinationFound 错误

意味着它找不到类com/google/protobuf/message。也许您错过了Build.gradle 中与com/google/protobuf/message 相关的依赖项之一。但是,您可以尝试添加此依赖项:

https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java/2.0.3

这似乎是相关的。

  • 另外,请使用implementation 而不是compile
  • 尝试禁用 multidex 或将其更新到最新版本 (1.0.3)。

【讨论】:

    猜你喜欢
    • 2020-07-28
    • 2022-12-06
    • 2013-05-20
    • 1970-01-01
    • 2018-07-27
    • 1970-01-01
    • 1970-01-01
    • 2021-10-20
    • 2016-09-25
    相关资源
    最近更新 更多