Android studio 編譯時(shí)出現(xiàn)如下錯(cuò)誤
Error:FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithStackFramesFixerForRelease'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.utils.FileCache$FileCreatorException: java.util.zip.ZipException: error in opening zip file
* 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 0s
其實(shí)是讓你去查看更多的log信息。找到terminal
輸入如下命令:
gradlew compileDebug --stacktrace
如果上面的命令不管用,可以使用下面的命令試試
gradle compileDebug --stacktrace
可以看到很多錯(cuò)誤的信息輸出出來。
我的錯(cuò)誤是JAVA_HOME路徑錯(cuò)誤 如下所示:
ERROR: JAVA_HOME is set to an invalid directory: D:\Program Files\Java;
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
打開環(huán)境變量看到JAVA_HOME后面有個(gè)分號(hào)
因篇幅問題不能全部顯示,請(qǐng)點(diǎn)此查看更多更全內(nèi)容
Copyright ? 2019- 91gzw.com 版權(quán)所有 湘ICP備2023023988號(hào)-2
違法及侵權(quán)請(qǐng)聯(lián)系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市萬商天勤律師事務(wù)所王興未律師提供法律服務(wù)