react-native-zeroconf
react-native-zeroconf copied to clipboard
Error in react-native-zeroconf when trying to assembleRelease
I am trying to release my app to the play store and I followed the steps in https://facebook.github.io/react-native/docs/signed-apk-android
when i run ./gradlew assembleRelease I get the following error. I believe its a mismatch in gradle and library versions.
Execution failed for task ':react-native-zeroconf:verifyReleaseResources'.
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found. error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:7: error: resource android:attr/colorError not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:11: error: resource android:attr/colorError not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values-v26/values-v26.xml:15: error: style attribute 'android:attr/keyboardNavigationCluster' not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2714: error: resource android:attr/fontStyle not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2715: error: resource android:attr/font not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2716: error: resource android:attr/fontWeight not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2717: error: resource android:attr/fontVariationSettings not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2718: error: resource android:attr/ttcIndex not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2799: error: resource android:attr/startX not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2802: error: resource android:attr/startY not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2805: error: resource android:attr/endX not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2808: error: resource android:attr/endY not found. /Users/thehellmaker/test/testapp/node_modules/react-native-zeroconf/android/build/intermediates/res/merged/release/values/values.xml:2816: error: resource android:attr/offset not found. error: failed linking references.
Here is my build.gradle versions
buildscript { ext { buildToolsVersion = "28.0.2" minSdkVersion = 16 compileSdkVersion = 28 targetSdkVersion = 27 supportLibVersion = "28.0.0" } }
Most of these disappear when compileSdkVersion is downgraded to 26 from 28
@thehellmaker I cannot reproduce this anymore, but I think we had the same problem before setting the compileSdkVersion and buildToolsVersion for subprojects.
You can try to use the following in your build.gradle (put it at the end):
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
}
}
}
}
Hello, any news on this? Cannot assembleRelease, no matter what compileSdkVersion or targetSdkVersion I use...
I also can't build with RN 0.59
Anyone knows a solution for this? I really need this to work, I downgraded RN to 0.57 and SDK to 23 but still no luck, please help
Solution from @westcode worked for me...
I found out that the steps which produces error is after bundling, meaning you will get your app compiled and you have apk even if this error occurs, you can also use ‘’’gradle app:assembleRelease’’’ instead of ‘’’gradle assembleRelease ’’’ to supress error