liuxingyuzaixian
2019-05-26 19:51 阅读 798

AndroidStudio项目突然不能build打包了,但是run是可以的

AndroidStudio 3.0 mac jdk1.7 java环境
突然项目不能打包了,build apk,build signed apk都报错app:transformClassesWithMultidexlistForDebug,但是直接run是可以的

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 0s

然后尝试过得方法有
1,invalided caches /Restart 删除build重启电脑
2,彻底卸载AndroidStudio,重新安装
3,在App的build中添加

buildTypes {
        debug {
            useProguard true
        }
}

4,使用上个月压缩包备份的好的项目代码也不能跑
已经尝试过了baidu google stackoverflow上很多方法还是没解决问题,求大神指教下,不剩感激

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

相关推荐