当前位置: 首页 > 知识库问答 >
问题:

错误:任务执行失败:app:transformClassesWithDexForDebug。以非零退出值1结束

蒋健
2023-03-14

错误:任务': app: transformClassesSusDexForDebug'执行失败。

com.android.build.api.transform。TransformException:java.lang.RuntimeException:com.android.ide.common.process。ProcessException:java.util.concurrent。ExecutionException:com.android.ide.common.process。ProcessException:org.gradle.process.internal。ExecException:处理“命令”E:\androidWare\jdk1.7\bin\java。exe“”在我的应用程序gradle文件中以非零退出值1结束

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.wjc.wjcrun"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
   'proguard-rules.pro'
    }
  }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
}
dependencies {
compile "org.igniterealtime.smack:smack-android:4.1.0-rc1"
compile "org.igniterealtime.smack:smack-tcp:4.1.0-rc1"
 }

这里是Project Build Gradle

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.3'
   }
}
  allprojects {
  repositories {
    jcenter()
  }
}
 task clean(type: Delete) {
delete rootProject.buildDir
}

共有1个答案

顾承平
2023-03-14

像这样使用build.gradle。

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.wjc.wjcrun"
    minSdkVersion 17
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
   'proguard-rules.pro'
    }
  }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'

compile "org.igniterealtime.smack:smack-android:4.1.0-rc1"
compile "org.igniterealtime.smack:smack-tcp:4.1.0-rc1"
 }
}
 类似资料: