我正在尝试导入我的项目。但是当我运行该应用程序时,出现以下错误:
处理'命令'G:\ Sdk \ build-tools \ 25.0.2 \ aapt.exe''完成,退出值非零1
如何解决此错误?
运行构建:构建失败
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processPixolDebugResources'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Failed to execute aapt
at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:201)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:82)
at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)
... 23 more
Caused by: com.android.ide.common.process.ProcessException: Failed to execute aapt
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:867)
at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:194)
... 33 more
Caused by: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process G:\Sdk\build-tools\25.0.2\aapt.exe with arguments {package -f --no-crunch -I G:\Sdk\platforms\android-25\android.jar -M \\?\G:\projects\pixol\doc\Pixol\app\build\intermediates\manifests\full\pixol\debug\AndroidManifest.xml -S G:\projects\pixol\doc\Pixol\app\build\intermediates\res\merged\pixol\debug -m -J \\?\G:\projects\pixol\doc\Pixol\app\build\generated\source\r\pixol\debug -F G:\projects\pixol\doc\Pixol\app\build\intermediates\res\resources-pixol-debug.ap_ -D \\?\G:\projects\pixol\doc\Pixol\app\build\intermediates\multi-dex\pixol\debug\manifest_keep.txt --debug-mode --custom-package com.browse.simply.chic -0 apk --output-text-symbols \\?\G:\projects\pixol\doc\Pixol\app\build\intermediates\symbols\pixol\debug --no-version-vectors}
at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:286)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:865)
... 34 more
Caused by: com.android.ide.common.process.ProcessException: Error while executing process G:\Sdk\build-tools\25.0.2\aapt.exe with arguments {package -f --no-crunch -I G:\Sdk\platforms\android-25\android.jar -M \\?\G:\projects\pixol\doc\Pixol\app\build\intermediates\manifests\full\pixol\debug\AndroidManifest.xml -S G:\projects\pixol\doc\Pixol\app\build\intermediates\res\merged\pixol\debug -m -J \\?\G:\projects\pixol\doc\Pixol\app\build\generated\source\r\pixol\debug -F G:\projects\pixol\doc\Pixol\app\build\intermediates\res\resources-pixol-debug.ap_ -D \\?\G:\projects\pixol\doc\Pixol\app\build\intermediates\multi-dex\pixol\debug\manifest_keep.txt --debug-mode --custom-package com.browse.simply.chic -0 apk --output-text-symbols \\?\G:\projects\pixol\doc\Pixol\app\build\intermediates\symbols\pixol\debug --no-version-vectors}
at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:74)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:49)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:78)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:74)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
at com.android.build.gradle.internal.process.GradleProcessExecutor$1.run(GradleProcessExecutor.java:60)
Caused by: org.gradle.process.internal.ExecException: Process 'command 'G:\Sdk\build-tools\25.0.2\aapt.exe'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:369)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:47)
... 9 more
这是我的gradle文件
apply plugin: 'com.android.application'
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
manifestPlaceholders = [appPackageName: "${applicationId}"]
multiDexEnabled true
}
dexOptions {
jumboMode true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
pixol {
applicationId "com.dslr.camera.pixol"
//Package name change it before uploading to store
resValue "string", "app_name", "Pixol" //app name change it before uploading to store
resValue "string", "dev_name", "" // Google play developer name
resValue "string", "facebook_app_id", "" //facebook app id (get it from facebook sdk see the dcumentation)
//admob
resValue "string", "main_full", "YOUR_ADMOB_AD_UNIT_HERE"// admob interstitial ad 1
resValue "string", "result_full", "YOUR_ADMOB_AD_UNIT_HERE" // admob interstitial ad 2
resValue "string", "main_native", "YOUR_ADMOB_AD_UNIT_HERE" // admob naive large tamplate
resValue "string", "result_native", "YOUR_ADMOB_AD_UNIT_HERE" // admob naive large tamplate
//audience network
resValue "string", "main_full_fb", "YOUR_FACEBOOK_AD_UNIT_HERE"// fb ad interstitial ad 1
resValue "string", "result_full_fb", "YOUR_FACEBOOK_AD_UNIT_HERE"// fb ad interstitial ad 2
manifestPlaceholders = [appIcon: "@mipmap/ic_launcher"] // app icon change in mipmap folder
versionCode 2
versionName "1"
}
}
/* 3) Exclude duplicate licenses */
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
pickFirst 'AndroidManifest.xml'
exclude 'META-INF/rxjava.properties'
}
}
dependencies {
/* compile fileTree(include: ['*.jar'], dir: 'libs')
*//* 4) Add the CSDK framework dependencies (Make sure these version numbers are correct) *//*
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.mlsdev.rximagepicker:library:2.0.0'
compile 'com.adobe.creativesdk.foundation:auth:0.9.1251'
compile 'com.adobe.creativesdk:image:4.8.4'
compile 'com.localytics.android:library:3.8.0'
compile 'com.github.medyo:fancybuttons:1.8.3'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.android.support:multidex:1.0.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.facebook.android:audience-network-sdk:4.+'
compile 'com.google.android.gms:play-services-ads:10.2.1'
compile 'com.cocosw:bottomsheet:1.+@aar'*/
}
如何解决此问题
如何解决此错误?** 进程'G'\ Sdk \ build-tools \ 25.0.2 \ aapt.exe命令完成,退出值非零1