0

I've just installed Android Studio and I've spent a good couple of days trying to set it up but I got errors here and there.

My current error is:

Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error

It looked through similar questions on SO, but I couldn't find a helpful solution.

I have Android Studio Version 3.1.3

I have the following in my build.grade file, but the problem still exists.

compileSdkVersion 27

buildToolsVersion '27.0.3'

enter image description here

I can solve this issue by adding the following line into gradle.properties file with a warning The option 'android.enableAapt2' is deprecated and should not be used anymore:

android.enableAapt2=false

But I get another error instead:

No resource identifier found for attribute 'appComponentFactory' in package 'android'

1 Answer 1

1
  1. Go to https://developer.android.com/studio/releases/platform-tools
  2. Click on SDK Platform-Tools for Windows for downloading
  3. Unzip the archive and add it to your /Android/platform-tools directory
  4. Restart Android Studio

Also, you can try to change Android Emulator to a different from the default one.

Sign up to request clarification or add additional context in comments.

2 Comments

@dgr279 I give up after I unzip the download how do I add it to Android/platform-tools directory
@Grendel, go to the folder you've installed your Android Studio into. Mine was C:\Android\platform-tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.