I'm executing "tns run android" on a NativeScript project but I'm getting the following errors:
C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a 922193e097e31bddc3aa6795fc06\res\values-v26\values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a 922193e097e31bddc3aa6795fc06\res\values-v26\values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a 922193e097e31bddc3aa6795fc06\res\values-v26\values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a 922193e097e31bddc3aa6795fc06\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/fontStyle not found.
C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a 922193e097e31bddc3aa6795fc06\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/font not found.
C:\Users\jim\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.0.2.aar\462a 922193e097e31bddc3aa6795fc06\res\values\values.xml:252:5-69: AAPT: error: resource android:attr/fontWeight not found.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to process resources, see aapt output above for details.
I'm new to NativeScript and to Android development. What are the recommended steps to debug/fix this error?
I believe colorError
was introduced in support version 28.0.0. Since it looks like you're using 27.0.2 you can just use textColorError
instead.
You need to change Android's SDK version to 26
app/App_Resources/Android/app.gradle
android {
compileSdkVersion 26
buildToolsVersion "26.0.3"
defaultConfig {
generatedDensities = []
applicationId = "org.nativescript.blankng"
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With