Errors occur when changing Gradle to 26.0.2.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error: Execute failed for task ': app: mergeDebugResources'.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Here is the Gradle itself:

android { compileSdkVersion 24 buildToolsVersion '26.0.2' defaultConfig { applicationId "тут типо название" minSdkVersion 15 targetSdkVersion 24 versionCode 4 versionName "4.5.4" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" useLibrary 'org.apache.http.legacy' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2' compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2' compile 'com.android.volley:volley:1.0.0' compile 'com.android.support:support-v4:25.2.0' compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:appcompat-v7:24.2.1' compile 'com.android.support:design:23.1.1' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support:cardview-v7:21.0.3' compile 'com.android.support:recyclerview-v7:21.0.3' compile 'org.jsoup:jsoup:1.10.3' compile 'com.squareup.picasso:picasso:2.5.2' testCompile 'junit:junit:4.12' compile 'com.google.code.gson:gson:2.8.2' } 
  • The very essence of the error is not indicated. And 26.0.2 is not a version of Gradle. - Eugene Krivenja
  • one
    You have all the support library of any horrible versions. specify for everyone the same version to begin with, the studio itself will suggest which versions are current 27.0.0 - Yura Ivanov
  • great people thanks decided wahl - TIMUR SADULLAYEV TIMURImportan

3 answers 3

The essence of the error AAPT2 is that now Android Studio is looking for resources ".gradle" in the path "C: //User// user //.gradle". And if your username is spelled with the Russian alphabet, then the headline. :) this is text modification. (although before the update it rolled))).

It is fixed as follows in the settings: -> Settings -> Build, Execution -> Gradle -> Change the line "Service directory path" to "C: /Users/Public/.gradle"

After that, do a rebuild project and - voila! everything is working. And there will be no problems with new projects.

  • one
    thanks, saved, not only is sdk buggy with polzzatele in Russian, so also gradl)) - ergo
  • Yes, straight fire response at all) helped - V. Kalyuzhnyu

Hello! Yes, the problem is that the name of the user company in Russian. I have long had the same problem on the previous version of Android Studio. I found the output not the best, but working: on the computer I created a new account in Latin, installed Android Studio and everything began to work.

But there are downsides: the first time I had to constantly switch, because some data remained with the Russian-speaking user - photos, Photoshop, some links, and indeed the whole life of the Russian-speaking user. And if you have an old project, it will be difficult to transfer everything there.

I thought to translate all data and programs into English, but there are many working programs that need to be reinstalled, and this is very dreary. While working on 2 login.

    The solution is simple, add the following line to the files gradle.properties android.enableAapt2=false

    • 3
      I would not call it a solution. - Eugene Krivenja
    • 6
      This is a "crutch". After removing aapt1, it will break again - DeKaNszn

    Protected by a community spirit Nov. 29 '17 at 5:53 pm .

    Thank you for your interest in this issue. Since he collected a large number of low-quality and spam responses, which had to be deleted, now it’s necessary to have 10 reputation points on the site (the bonus for account association is not counted ).

    Maybe you want to answer one of the unanswered questions ?