简体   繁体   中英

Android resource compilation failed when opening a new project in android studio

I have this error when opening new project with my android studio

Android resource compilation failed Output: C:\\Projects\\Popular2\\app\\src\\main\\res\\drawable-v24\\ic_launcher_foreground.xml:1: error: not well-formed (invalid token) .

Command: C:\\Users\\Personal.gradle\\caches\\transforms-1\\files-1.1\\aapt2-3.2.1-4818971-windows.jar\\e2bfab9f446f5b6bef325bd9d21fcd8e\\aapt2-3.2.1-4818971-windows\\aapt2.exe compile --legacy -o C:\\Projects\\Popular2\\app\\build\\intermediates\\res\\merged\\debug C:\\Projects\\Popular2\\app\\src\\main\\res\\drawable-v24\\ic_launcher_foreground.xml

Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #1

I have tried to clean and rebuild the app but didn't help! Any help ?

You should : Go to your project location

  1. delete the drawable-v24 folder.

  2. delete the mipmap-anydpi-v26 if exist.

  3. rebuild your project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM