Android: Execution failed for task ':app:proce

2020-02-05 18:15发布

Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/mobi27/opt/AND-Studio/Android/Sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1

9条回答
孤傲高冷的网名
2楼-- · 2020-02-05 18:36

I forgot to install the 32bit dependencies:

sudo apt-get install -y lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 sudo apt-get install -y lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev

查看更多
孤傲高冷的网名
3楼-- · 2020-02-05 18:39

go to Android SDK Manager--->Tool---->check the Android SDK Buil-tolls you have installed, -------------->go to your module's build.gradle--->fill the right "buildToolsVersion"

查看更多
放荡不羁爱自由
4楼-- · 2020-02-05 18:41

My solution is: Menu Build -> Clean Project.

I deleted and pasted a picture a while before. The picture has the same problem, so something wrong happened.

查看更多
家丑人穷心不美
5楼-- · 2020-02-05 18:44

Check if you added a resource that violates the conventions. E.g. cannot have capital letters and such.

In my case I got the error as I had modified a drawable resource and Photoshop saved the image with capital filetype (file_name.PNG). Changing the filename to lower-case and rebuilding the project solved the problem.

查看更多
Ridiculous、
6楼-- · 2020-02-05 18:47

In my case I tried to change buildToolsVersion in gradle, but it didn't help me. My problem was fixed when I found drawable which called example.PNG. It should be example.png;

查看更多
劫难
7楼-- · 2020-02-05 18:49

It appears you're missing the 22.0.1 build tools. Try going to the Tools>Android>SDK Manager and seeing what version of 'Android SDK Build-tools' you have installed. If it isn't already installed or needs an update, put a checkmark next to the 22.0.1 tools and click install.

查看更多
登录 后发表回答