Error – Android resource linking failed (AAPT2 27.0.3 Daemon #0)

Total
0
Shares

I have this error

I am try reinstall android studio and remove .gradle folder , any solution please?

    Error:FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed (AAPT2 27.0.3 Daemon #0)
  Command: C:javasdkbuild-tools27.0.3aapt2.exe link -I
          C:javasdkplatformsandroid-26android.jar
          --manifest



  C:UsersJalal D.gradlecachestransforms-1files-1.1fonticon-0.1.8.aar2b09376fc14469ba65fc8e4d85c2eed1resvaluesvalues.xml:19:5-25:25: AAPT: error: resource android:attr/fontVariationSettings not found.

  C:UsersJalal D.gradlecachestransforms-1files-1.1fonticon-0.1.8.aar2b09376fc14469ba65fc8e4d85c2eed1resvaluesvalues.xml:19:5-25:25: AAPT: error: resource android:attr/ttcIndex not found.

  error: failed linking references.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 3s

Solution

Had exactly the same problem. Solved it by doing the following:
Searching for and replacing com.android.support:support-v4:+ with com.android.support:support-v4:27.1.0 in the platform/android directory.

Also I had to add the following code to the platforms/android/app/build.gradle and platforms/android/build.gradle files:

configurations.all {
resolutionStrategy {
    force 'com.android.support:support-v4:27.1.0'
}}

Edited to answer “Where is this com.android.support:support-v4:+ setting ?” …

The setting will probably(in this case) be in one of your plugin’s .gradle file in the platform/android/ directory, for example in my case it was the starter-barcodescanner plugin so just go through all your plugins .gradle files :

enter image description here

Double check the platforms/android/build.gradle file.

Hope this helps.

Source: StackOverflow.com

Leave a Reply

Your email address will not be published. Required fields are marked *