No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'


#1

Hi,

When I try to build the Android project I am getting the below error. Anyone knows how to resolve it.

/platforms/android/build/intermediates/res/merged/F1F2F3/debug/values-v23/values-v23.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name ‘android:TextAppearance.Material.Widget.Button.Inverse’.

/platforms/android/build/intermediates/res/merged/F1F2F3/debug/values-v23/values-v23.xml:18: AAPT: Error retrieving parent for item: No resource found that matches the given name ‘android:Widget.Material.Button.Colored’.

/platforms/android/build/intermediates/res/merged/F1F2F3/debug/values-v23/values-v23.xml:18: error: Error retrieving parent for item: No resource found that matches the given name ‘android:Widget.Material.Button.Colored’.

:processF1F2F3DebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processF1F2F3DebugResources’.

com.android.ide.common.process.ProcessException: Failed to execute aapt


#2

@Kiruba07 by the looks of it, it is possible that one of the two other android plugins you’ve included in your app has faulty resources.

Mind sharing your package.json, the api level, the latest platform sdk you’ve downloaded (check $ANDROID_HOME/platforms/)?


#3

Hi @Pete.K,

Thanks for quick response.

package.json

{
“description”: “NativeScript Application”,
“license”: “SEE LICENSE IN “,
“readme”: “NativeScript Application”,
“repository”: “”,
“nativescript”: {
“id”: “org.nativescript.Test”,
“tns-android”: {
“version”: “3.1.0”
}
},
“dependencies”: {
@angular/animations”: “~4.1.0”,
"@angular/common": “~4.1.0”,
"@angular/compiler": “~4.1.0”,
"@angular/core": “~4.1.0”,
"@angular/forms": “~4.1.0”,
"@angular/http": “~4.1.0”,
"@angular/platform-browser": “~4.1.0”,
"@angular/router": “~4.1.0”,
“nativescript-angular”: “~3.0.0”,
“nativescript-plugin-firebase”: “^4.0.2”,
“nativescript-telerik-ui-pro”: “^2.0.1”,
“nativescript-theme-core”: “~1.0.2”,
“reflect-metadata”: “~0.1.8”,
“rxjs”: “~5.3.0”,
“tns-core-modules”: “~3.0.0”,
“zone.js”: “~0.8.2”
},
“devDependencies”: {
“babel-traverse”: “6.25.0”,
“babel-types”: “6.25.0”,
“babylon”: “6.17.4”,
“lazy”: “1.0.11”,
“nativescript-dev-typescript”: “~0.4.0”,
“typescript”: “~2.2.1”
}
}

Build tools:
The SDK I have is android-22 in $ANDROID_HOME/platforms/.


#4

This happens because one of the plugins, very likely the nativescript-telerik-ui-pro depends on an android support library version 23+. At this point you could try to pin down the support libraries:

    compile "com.android.support:support-v4:22.+"
    compile "com.android.support:appcompat-v7:22.+"

Although that may not always work if the external dependencies have already been packaged (’.aar’`d) against a higher version.

Your best bet now is to download Android Platform 23 or higher, as well as any accompanying support libraries there may be.


#5

Thanks @Pete.K,

I have downloaded latest android platform sdk 25 and now it is working fine.