Reputation: 3563
I checked the Local history of my XML files and double checked my Manifest file and found nothing wrong.
Before posting the question I went through a lot of similar posts and suggested answers but found nothing relevant to my issue. Down below you will find my LOG and hopefully one of you can guide me through a solution!
Android resource linking failed Output: \AndroidProjects\myApp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. \AndroidProjects\myApp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. \AndroidProjects\myApp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:605: error: resource android:attr/fontVariationSettings not found. \AndroidProjects\myApp\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:605: error: resource android:attr/ttcIndex not found. error: failed linking references.
Command: C:\Users\lucif.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\c9d8fd27aeabc6968bb2cb43f288855c\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\ C:\Users\lucif\AppData\Local\Android\Sdk\platforms\android-27\android.jar\ --manifest\ \AndroidProjects\myApp\app\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\ -o\ \AndroidProjects\myApp\app\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\ -R\ \AndroidProjects\myApp\app\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\ --auto-add-overlay\ --java\ \AndroidProjects\myApp\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\ --custom-package\ hivemind.lab.com.myApp\ -0\ apk\ --output-text-symbols\ \AndroidProjects\myApp\app\build\intermediates\symbols\debug\R.txt\ --no-version-vectors Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Upvotes: 11
Views: 44734
Reputation: 157
I had a similar problem..
Turns out I was using a dependency that was too recent and not compatible with my Min sdk in my app build.gradle file
Using a lower version solved the problem
Upvotes: 0
Reputation: 1
The problem here is related to the reference not being found. Try checking the values files for any problem first. Secondly, you can look into your Xml files to check for any wrong attribute for any view. The last way for solving is to clean and rebuild your project or invalidate and restart.
Upvotes: 0
Reputation: 538
I solved this problem with a little change in the build.Gradle (Module:app) file. just add or remove or change version of a library then sync your project..this worked for me.
Upvotes: 1
Reputation: 2735
In my case, I made two custom backgrounds which were not recognised.
I removed the <?xml version="1.0" encoding="utf-8"?>
tag from the top of those two XML resources file.
This worked for me, after trying many solutions from the community. Errors with XML files are quite hard to figure out. They even trickle their impact down to Java files.
Upvotes: 7
Reputation: 1730
Solution 1: Set your compileSdkVersion
to 28 and let Android Studio download the needed files.
If you already targetting this version, you could try cleaning your project and sync your gradle files.
Upvotes: 12