[fixed]aapt2 error-aapt2 error in android studio
You have check the following thing in your android studio project.
1- XML file doesn't have blank.
2-Drawable file not having any issue like capital letters or any special symbols in name.
3-If aapt2.exe is missing continuously then scan your PC C drive
METHOD-2
First of all update your assemble gradle variant in Project level
build.gradle to most recent form build.gradle.
buildscript {
dependencies{
/pick most recent if accessible classpath 'com.android.tools.build:gradle:3.3.0-alpha06' }
}
and gradle-wrapper.properties
/pick most recent if accessible distributionUrl=https\://services.gradle.org/circulations/gradle-4.9-all.zip
That is it! Sync your task and Run
METHOD-3
I additionally experienced this blunder. , it was while changing the objective SDK from 27 to 26. I had the option to tackled the issue by changing the appcompat reliance variant from
execution 'com.android.support:appcompat-v7:27.1.0'
TO
execution 'com.android.support:appcompat-v7:26.4.0'
METHOD-4
On the off chance that you are utilizing incorrectly shading code #ff00000 which is invalid since it has 7 digit however shading code ought to have 3 or 6 or 8 digit in addition to # prefix
METHOD-5
Check and attempt underneath things. Issue ought to be settled.
Above all else check your log from base of the construct window whether any blunder identified with venture appearing or not.
In the event that mistake appearing, at that point fix those. Presently fabricate and run again fix the entirety of the blunder comes up. It will take out aapt2 issue without changing android gradle module to 3.2.0.
Besides if there isn't any task related blunder appearing in the manufacture log yet at the same time indicating aapt2 mistake then you can fix it by following underneath steps.
Update your android gradle module in your
venture level build.gradle file like underneath:
classpath 'com.android.tools.build:gradle:3.2.0-alpha13'
Presently update android.enableAapt2=true. At that point check and construct your undertaking.
Any of these means should work to fix aapt related issues.
METHOD-6
In the event that you are utilizing Kotlin getting blunder in light of certain slip-ups in xml records.
In kotlin its elusive xml blunders, assemble getting bomb just . To realize the specific blunder log run beneath order in Android Studio Terminal and it is anything but difficult to fix the mistakes.
./gradlew clean ./gradlew assemble
EmoticonEmoticon