java 错误:任务执行失败,以非零退出值 1 结束
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33840001/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error:Execution failed for task , finished with non-zero exit value 1
提问by Muhammad Abdullah
Error:Execution failed for task ':onyxenrollwizardsampleapp:processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1
错误:任务 ':onyxenrollwizardsampleapp:processDebugResources' 的执行失败。com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Android\sdk\build-tools\23.0.2\aapt.exe'' 完成了非零退出值 1
Here is my Gradle file. Kindly help me out
这是我的 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'
}
回答by Abraham Flores
Go to Build menu - Clear Project, and Rebuild Project, It worked for me..
转到构建菜单 - 清除项目和重建项目,它对我有用..
回答by IgorGanapolsky
This is due to incorrectly configured AndroidManifest. For example, the
这是由于错误地配置了 AndroidManifest。例如,
package="com.mypackage.myname"
may be incorrect, or it doesn't match the applicationId in build.gradle:
可能不正确,或者它与build.gradle中的 applicationId 不匹配:
applicationId "com.mypackage.myname"
Make sure you fix those.
确保你修复了这些。
回答by Andrey
Sometimes it happens after updating. Next 2 steps may help:
有时在更新后发生。接下来的 2 个步骤可能会有所帮助:
From "Build" menu.
从“构建”菜单。
Build -> Clean Project
Build -> Rebuild Project
回答by humna
Check that that sdk version 23 is installed or not.
检查是否安装了 sdk 版本 23。
回答by u5856230
I caused this error because the code below
我导致这个错误是因为下面的代码
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
in the AndroidMainfest.xml
file and i remove this code will work fine.
在AndroidMainfest.xml
文件中,我删除此代码将正常工作。
回答by Rajesh
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'
}