BuildException:无法执行aapt

时间:2017-12-27 21:35:00

标签: java android gradle android-gradle android-build

我正在尝试构建项目并且出现以下错误:

    org.gradle.tooling.BuildException: Failed to execute aapt
    at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.invokeAaptForSplit(LinkApplicationAndroidResourcesTask.java:547)
    at com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.doFullTaskAction(LinkApplicationAndroidResourcesTask.java:280)
    at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Caused by: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process /home/local/MPROGA1/malwinder.singh/Desktop/SDK/android-sdk-linux/build-tools/27.0.1/aapt with arguments {package -f --no-crunch -I /home/local/MPROGA1/malwinder.singh/Desktop/SDK/android-sdk-linux/platforms/android-25/android.jar -M /home/local/MPROGA1/malwinder.singh/Desktop/Projects/Oversight/app/build/intermediates/manifests/full/debug/AndroidManifest.xml -S 

当我尝试运行该应用程序时,出现以下错误:

  

APK文件   /home/local/MPROGA1/malwinder.singh/Desktop/Projects/Oversight/app/build/outputs/apk/debug/app-debug.apk   在磁盘上不存在。安装APK时出错

1 个答案:

答案 0 :(得分:0)

  

您是否尝试在

中使用此功能
android.enableAapt2=false
  

在您的Android gradle属性