android studio 3.0 – Failed linking file resources

android studio 3.0 – Failed linking file resources

You maybe having this error on your java files because there is one or more XML file with error.

Go through all your XML files and resolve errors, then clean or rebuild project from build menu

Start with your most recent edited XML file

If anyone reading this has the same problem, this happened to me recently, and it was due to having the xml header written twice by mistake:

<?xml version=1.0 encoding=utf-8?>
<?xml version=1.0 encoding=utf-8?> <!-- Remove this one -->
<shape xmlns_android=>
     <solid [email protected]/mug_blue/>
     <corners [email protected]/featured_radius />

The error I was getting was completely unrelated to this file so it was a tough one to find. Just make sure all your new xml files dont have some kind of mistake like this (as it doesnt show up as an error). EDIT It seems like it shows up as an error now, make sure to check your error logs.

android studio 3.0 – Failed linking file resources

One possible solution I already mentioned in a comment:

I had an issue in XML file that IDE did not highlight. Had to ask my
colleague to compile for me and it shown in his IDE. Buggy Android

But I found a way around that.

If you go to Gradle panel on the right. Select your desired module, eg. app, then under build select assembleDebug it will show you all errors in stdout.


Leave a Reply

Your email address will not be published.