Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After installing Android Studio 3.1 I get "AAPT2 error: check logs for details"

Tags:

android

I tried turning off AAPT2 but it didn't work. Below is the log.

Build: build failed 5s 44ms Run build 4s 889ms Load build 47ms Run init scripts 43ms Evaluate settings 2ms Configure build 776ms Calculate task graph 2s 211ms Run tasks 1s 839ms null
/Users/dt/AndroidStudioProjects/HappyBirthday app/src/main/res/layout/activity_main.xml error: resource dimen/activity_vertical_margin (aka com.example.android.happybirthday:dimen/activity_vertical_margin) not found. error: resource dimen/activity_horizontal_margin (aka com.example.android.happybirthday:dimen/activity_horizontal_margin) not found. null failed linking file resources.

like image 205
davidtspf Avatar asked Mar 28 '18 22:03

davidtspf


1 Answers

After upgrading Android Studio you must invalidate caché and restart Android Studio

File > Invalidate Cache / Restart

introducir la descripción de la imagen aquí

like image 167
Jorgesys Avatar answered Oct 13 '22 00:10

Jorgesys