Got following error after updating Android Studio from 171.xxxxx to latest 173.xxxxx. I am not able to build any project due to this. Tried various ways but unable to find the solution. I really appreciate your help!
Asked
Active
Viewed 198 times
2
-
Android Studio isn't the problem. The Gradle version & build plugin you're using that was upgraded can cause those two errors. – OneCricketeer Mar 27 '18 at 17:39
-
jCenter is having issues. See the discussion [here](https://stackoverflow.com/questions/49510176/android-studio-gradle-sync-failed-could-not-head-received-status-code-5/49511911#49511911) – Bryon Nicoson Mar 27 '18 at 17:43
-
right click and delete gradle from your project. then restart android studio. it will download latest gradle automatically. then project can buid. – Dinith Rukshan Kumara Mar 27 '18 at 18:01
-
1Please don't post screenshots. You can switch the gradle view to text mode using the icon on the left below the green hammer. Then copy the text and edit your question using that text. – Robert Mar 27 '18 at 18:04
1 Answers
0
Add following line in gradle.properties and build and run
android.enableAapt2=true

Pratik ED
- 151
- 1
- 1
- 13
-
Please explain a little bit about your answer and how it is solving the problem. – Ezio Mar 28 '18 at 05:24