react-native-material-kit
react-native-material-kit copied to clipboard
Can't build after updating to RN 56 - Execution failed for task ':react-native-material-kit:verifyReleaseResources'
I'm unable to generate a release build after upgrading to React Native 56:
:react-native-material-kit:verifyReleaseResources/Users/user/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/d966a29d4964b9817b018d8a3a1d16a4/res/values-v26/values-v26.xml:13:5-16:13: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-material-kit:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
Looks like compileSdkVersion and buildToolsVersion in build.gradle need to be updated. They're pointing to old versions right now:
compileSdkVersion 24
buildToolsVersion '23.0.3'
I managed to fix this by add below lines into project root's build.gradle that force subprojects to build using the same sdk:
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
}
}
}
}
Replace version with yours.