android - Android Project中的Gradle构建错误

标签 android android-studio gradle android-gradle-plugin

我正在跟踪构建错误

任务':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/

相关文章:

android - 无法使用 Robolectric 编译测试

Android 数据库选择查询 - 不显示所有记录

android - 包含带有 android flavor 的库

Android Studio - 基于 Git 的多平台项目的 CRLF 与 LF

android - 使用 android studio 创建扫描动画

jenkins - 如何将参数从 Jenkins 脚本传递到gradle

android - 3G调制解调器和Wifi?

android - ionic 标签恼人的激活颜色

android - list 合并失败 : uses-sdk:minSdkVersion 14 cannot be smaller than version L

android - 如何使用 com.sun.webkit 编译 Android 项目