While trying to run the app in release mode on Android, there are potential issue you can run into:
If you see this error: AAPT: error: resource android:attr/colorError not found. follow this post and add this to your android build.gradle file:
subprojects {
afterEvaluate {
project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion = 28
buildToolsVersion = "28.0.3"
}
}
}
}
This forces the app to use the specific SDK version for building.
If you see this error: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so result: 0 follow this post and add this line to your app build.gradle file:
implementation 'com.facebook.soloader:soloader:0.9.0+'
This updates the soloader which should solve an issue where JSC-Android wouldn't load (the libhermes error isn't actually correct in this case).
If you are building an app using the
ws
protocol, you need to add this bit of code in the mainAndroidManifest.xml
file in theapplication
body:android:usesCleartextTraffic="true"
.If you use the
wss
you do not need to add this line of code. Reference