How to fix 22.0.1 \ aapt.exe '' completed with nonzero exit value 1

I encoded in android studio, then this error will appear:

cannot resolve the character "R"

Error: execution completed for task ': demo: processDebugResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process' command 'D: \ Android Development \ sdk \ android-sdk \ build-tools \ 22.0.1 \ aapt.exe' 'completed with nonzero value of output 1

this is my gradle:

apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion '22.0.1' defaultConfig { applicationId "br.liveo.ndrawer" minSdkVersion 21 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } } dependencies { compile project(':library') compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:design:22.2.0' compile 'com.android.support:appcompat-v7:22.2.0' } 

I use Android Studio V 1.0, all API 22 and API 21 are updated, as well as tools and additional features of the SDK Manager.

these options do not work:

File / Invalidate Cashes / Restart

Build / Restore Project

Assembly / cleaning project

What should I know?

Tnx

+6
source share
10 answers

I solve my problem:

1) check all your XML files for a given unknown src. ImageView or ImageButton or any thoughts, et:

Android: src = "@ Drawable / map"

then

Build / Restore Project

or

Assembly / cleaning project

or

File / Invalidate Cashes / Restart

Your problem will probably be solved 100%: D

+10
source

This error may be raised due to duplication of resources / files. To find out the names and duplication path of resources:

  • Go to File> Settings> Build, Run, Deploy . Select "Compiler" from the sub-options.

  • Type - debug at the command prompt. Click Ok.

enter image description here

  1. Run the project. In the AS Messages window, the compiler will tell you about all the problems.

enter image description here

Hope this helps!

+7
source

I found that the problem of solucion is that I add 2 images that can be done in drawable, and the other in drawable-es, but in this last name it was (the same thing that can be extracted, for example, myimagen.jpg) but the extension was uppercase

in drawable it was myimagen.jpg and drawable-es it was myimagen.JPG

I rebuild, clean and rebuild, restart Android studio, restart my computer, and it didn’t work, then I give my name because my error says "processdebugresources"

Error: execution completed for task ': app: processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command' C: \ Users \ auc \ AppData \ Local \ Android \ sdk \ build-tools \ 23.0. 1 \ aapt.exe '' completed with nonzero exit value 1

+2
source

I compiled with the build version 23.0.2, and the implemented 23.0.3 was available in the Android SDK. Installed a new version, changed the build version in build.gradle, and after that Android worked.

It should also be noted that this error did not start until I changed my splash screen images to 9-patch.

+2
source

In my case, I renamed the file in the project resources folder to "~ / blah" in Finder, hoping that it would put it in my home directory, like on Linux, but instead Finder literally added a tilde-slash to the file name. aapt did not like it.

+1
source

I had the same problem for a while, I just updated android studio to version 1.3 in the channel channel. That decided him.

0
source

Upgrade the buildtoolsversion version to 23.0.2 at the gradle application level and add the following to the same gradle:
The defaultconfig () method should look like

  defaultConfig { applicationId "zohoshow.suite" minSdkVersion 19 targetSdkVersion 23 versionCode 1 versionName "1.0" generatedDensities = [] multiDexEnabled true } 

and add the following as another method parallel to defaultconfig

 aaptOptions { additionalParameters "--no-version-vectors" } 
0
source

This could happen if you initialized something with null instead of @null in xml.

0
source

Just listen to me ... By finding all the requirements. TIPS About your May good or may not work, so please move on to the next TIP. It will work 100% after a long search. I got this TIP.

Modify buildToolsVersion compileSdkVersion as below: ...

Prior to this: it did not work ...

 android { compileSdkVersion 23 buildToolsVersion '22.0.1' defaultConfig { applicationId 'com.kdmsl.kraapp' minSdkVersion 14 versionCode 3 versionName "1.3" aaptOptions { additionalParameters "--no-version-vectors" } } 

After the changes:

 android { compileSdkVersion 23 buildToolsVersion '23.0.0' defaultConfig { applicationId 'com.kdmsl.kraapp' minSdkVersion 14 versionCode 3 versionName "1.3" aaptOptions { additionalParameters "--no-version-vectors" } } 
-1
source

This is a terrible mistake. Because of this, I have lost all confidence in android studio.

What happens when you make changes to your XML layouts, something happens internally with the files generated by the studio.

So you may want to compile after every change.

I had to refuse to view the text one at a time to make the assembly work.

I carefully looked at the differences when I brought the text views back.

There was no difference.

Android studio just has a problem.

-1
source

Source: https://habr.com/ru/post/989298/


All Articles