react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

Support for android 14

Open ghost opened this issue 8 months ago • 5 comments

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:

ghost avatar Nov 01 '23 13:11 ghost

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.

ertugruldogan avatar Nov 07 '23 13:11 ertugruldogan

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));
		}
 	}

thuongtv-vn avatar Nov 10 '23 02:11 thuongtv-vn

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).

OskarEichler avatar Dec 08 '23 14:12 OskarEichler

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 avatar Dec 08 '23 14:12 ertugruldogan

@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

OskarEichler avatar Dec 08 '23 23:12 OskarEichler