Reputation: 41
Resources working on other XML layouts on certain layouts are grayed out, inaccessible
This is causing some widgets not to work - Error Android resource linking failed on every card-view widget
This is the Build output
Build failed :app:processDebugResources app/src/main/res/layout/bill_payment.xml Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed Android resource linking failed
This is the Event Log
13:02 Executing tasks: [:app:assembleDebug] in project C:\Users\acer\Downloads.ankApp\BankApp
13:02 Gradle build failed in 24 s 131 ms
14:30 Executing tasks: [:app:assembleDebug] in project C:\Users\acer\Downloads.ankApp\BankApp
14:32 Gradle build failed in 2 m 13 s 786 ms
Upvotes: 1
Views: 1098
Reputation: 2512
The fact that they are greyed out simply means that those items are not being used in your layout. You can remove them.
As far as the 'resource linking failed' error, that could be due to a number of reasons in your XML. It could be caused by having the the code below twice in an XML in the drawable folder:
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
Take a close look at the error logging to try to determine which specific XML file is causing the error.
Also, the error could be caused by upgrading the support libraries to 28 and above without having your compileSdkVersion
set to 28 or higher.
Upvotes: 1