错误:任务的执行失败,以非零的退出值1结束

错误:执行任务':onyxenrollwizardsampleapp:processDebugResources'失败。 com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'command'C:\ Android \ sdk \ build-tools \ 23.0.2 \ aapt.exe'零出口值1

这是我的Gradle文件。 请帮助我

apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.example.onyx_enroll_wizard_sample_app" minSdkVersion 14 targetSdkVersion 23 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } lintOptions { abortOnError false } } repositories { mavenCentral() maven { url 'http://nexus.diamondfortress.com/nexus/content/repositories/releases' } maven { url 'http://nexus.diamondfortress.com/nexus/content/repositories/snapshots' } } dependencies { compile 'com.android.support:support-v13:23.0.1' compile 'com.dft.android:onyx-enroll-wizard:4.1.3' } 

Solutions Collecting From Web of "错误:任务的执行失败,以非零的退出值1结束"

转到生成菜单 – 清除项目,并重build项目,它为我工作..

 apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.1" //Just change this from 23.0.2 to 23.0.1 defaultConfig { applicationId "com.example.onyx_enroll_wizard_sample_app" minSdkVersion 14 targetSdkVersion 23 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } lintOptions { abortOnError false } } repositories { mavenCentral() maven { url 'http://nexus.diamondfortress.com/nexus/content/repositories/releases' } maven { url 'http://nexus.diamondfortress.com/nexus/content/repositories/snapshots' } } dependencies { compile 'com.android.support:support-v13:23.0.1' compile 'com.dft.android:onyx-enroll-wizard:4.1.3' } 

这是由于AndroidManifestconfiguration不正确。 例如,

  package="com.mypackage.myname" 

可能不正确,或者与build.gradle中的applicationId不匹配:

  applicationId "com.mypackage.myname" 

确保你解决这些问题。

有时会在更新后发生。 接下来的2个步骤可能有所帮

从“生成”菜单。

 Build -> Clean Project Build -> Rebuild Project 

检查是否安装了sdk版本23。

我造成这个错误,因为下面的代码

 <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> 

AndroidMainfest.xml文件中,我删除此代码将正常工作。