wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.01k stars 2.68k forks source link

Support for android 14 #7805

Open ghost opened 8 months ago

ghost commented 8 months ago

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?

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:

ertugruldogan commented 8 months ago

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.

thuongtv-vn commented 8 months ago

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.

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));
        }
    }
OskarEichler commented 7 months ago

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).
ertugruldogan commented 7 months ago

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.

OskarEichler commented 7 months ago

@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