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: AndroidProjectsmyAppappuildintermediatesincrementalmergeDebugResourcesmerged.dirvalues-v28values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
AndroidProjectsmyAppappuildintermediatesincrementalmergeDebugResourcesmerged.dirvalues-v28values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
AndroidProjectsmyAppappuildintermediatesincrementalmergeDebugResourcesmerged.dirvaluesvalues.xml:605: error: resource android:attr/fontVariationSettings not found.
AndroidProjectsmyAppappuildintermediatesincrementalmergeDebugResourcesmerged.dirvaluesvalues.xml:605: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: C:Userslucif.gradlecaches ransforms-1files-1.1aapt2-3.2.1-4818971-windows.jarc9d8fd27aeabc6968bb2cb43f288855caapt2-3.2.1-4818971-windowsaapt2.exe link -I
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Solution 1: Set your
compileSdkVersionto 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.
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.
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.
I had a similar problem..
Turns out I was using a dependency that was too updated and not compatible with my Min sdk in my app build.gradle file
Using a lower version solved the problem
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.