react-native-navigation
react-native-navigation copied to clipboard
Support for android 14
What happened?
App is getting crashed after upgrading android 13 to android 14
What was the expected behaviour?
No response
Was it tested on latest react-native-navigation?
- [X] I have tested this issue on the latest react-native-navigation release and it still reproduces.
Help us reproduce this issue!
No response
In what environment did this happen?
React Native Navigation version: React Native version: Has Fabric (React Native's new rendering system) enabled: (yes/no) Node version: Device model: Android version:
Android API = "34.0.0"
"react-native-navigation": "7.37.1" "react-native": "0.73.0"
Task :react-native-navigation:compileReactNative71DebugKotlin FAILED
'compileReactNative71DebugJavaWithJavac' task (current target is 17) and 'compileReactNative71DebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.
Change this code on JsDevReloadHandler.java in order to fix the registerReceiver API required on Android 14. But app crashes could be react-native version does not support Android 14.
- Upgrade react-native version or Build app as release it will not crash.
public void onActivityResumed(Activity activity) {
if(Build.VERSION.SDK_INT >= 34 && activity.getApplicationInfo().targetSdkVersion >= 34){
activity.registerReceiver(reloadReceiver, new IntentFilter(RELOAD_BROADCAST), Context.RECEIVER_NOT_EXPORTED);
}else{
activity.registerReceiver(reloadReceiver, new IntentFilter(RELOAD_BROADCAST));
}
}
We are having the same issue after upgrading to React Native 0.73
Execution failed for task ':react-native-navigation:compileReactNative71DebugKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileReactNative71DebugJavaWithJavac' (17) and 'compileReactNative71DebugKotlin' (1.8).
React Native 0.72.x JAVA 17 Working. React Native 0.73.x JAVA 17 Not Working, Since React Native 0.73.x is a new version, there may be problems with its own library. We would be very happy if React Native 0.73.x is up and running to target Android 14.
@ertugruldogan I'm confused - React Native 0.73 was released earlier this week and does target Android 14: https://reactnative.dev/blog/2023/12/06/0.73-debugging-improvements-stable-symlinks