我正在跟踪构建错误
任务':app:transformClassesWithDexForDebug'的执行失败。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
build --debug
build --stacktrace
build --info
最佳答案
查看--debug日志。从文本开始有一个非常冗长的错误描述:
处理“javax / transaction / HeuristicCommitException.class”时遇到麻烦:
Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library.
This is often due to inadvertently including a core library file in your application's project, when using an IDE (such as Eclipse). If you are sure you're not intentionally defining a core class, then this is the most likely explanation of what's going on.
我认为最重要的是,您不应该包括包含在java。*或javax。*中定义的类的库。您将必须减少依赖性。 Android开发通常无法处理J2EE类型代码。
关于android - Android Project中的Gradle构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35282673/