I am facing a problem when I open my android project. It has been since a while I haven't deal with my project. But I face different error when I change android studio version or gradle version. Sometimes I face Aapt2 error other time I face android resource complication in values folder. How do I get the exactly android studio and gradle version to open my project so as I can make some modification
- instead of trying to find te version of gradle and ANdroid Studio which worked, I suggest to fix the errors you get with the latest version.Vladyslav Matviienko– Vladyslav Matviienko2018-12-07 05:50:18 +00:00Commented Dec 7, 2018 at 5:50
- Newer versions of android gradle plugin use AAPT2 which is stricter when parsing and linking resources. Share the errors you're getting and we'll be able to help. Without them we won't be able to see what's going on in your project.Izabela Orlowska– Izabela Orlowska2018-12-10 14:38:24 +00:00Commented Dec 10, 2018 at 14:38
1 Answer
Regarding Aapt2
Aapt2 is enabled by default when you use android plugin for gradle 3.0.
This is to
improve incremental resource processing
as stated here.
But if you are facing issues with it, you can switch back to previous version by adding this in gradle.properties
android.enableAapt2=false
Non-ascii characters issues have been fixed in AAPT2 and android gradle plugin now (yay!). Instead of disabling AAPT2 now you can just use android gradle plugin version 3.2.0-alpha11 or newer and you should not encounter this error anymore.
Regarding Android resource compilation
Make sure you have no error in your ids.xml file.