gpt4 book ai didi

android - 错误 :Execution failed for task :app:transformClassesWithDexForDebug

转载 作者:行者123 更新时间:2023-11-30 01:21:36 27 4
gpt4 key购买 nike

当我运行我的应用程序时,Android Studio 抛出以下错误:

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe''

项目包含的外部jar库如下:

 dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile files('libs/org.apache.http.legacy.jar')
compile files('libs/fastjson.jar')
compile project(':pulltorefresh')
compile project(':circleheard')
compile 'com.android.support:appcompat-v7:23.0.1'
}

compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.example.codeparanoia.house"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}

我无法解决这个问题。请帮帮我。提前致谢。现在,当我创建一个新项目(Hello World)时,OMG,该项目没有工作!!!

最佳答案

  1. 通过转到

    尝试清理您的项目
    Build Menu > Clean Project
  2. 重启 Android Studio 并重建项目

    Build Menu > Rebuild Project

另一种解决方案可能是在您的 build.gradle(app) 中启用 multidex:

defaultConfig {
multiDexEnabled true
}

关于android - 错误 :Execution failed for task :app:transformClassesWithDexForDebug,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37017563/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com