React Native Android App Crash After Upgrade targetSdkVersion 34

Solution

Compile Sdk Issue:

Third-Party package issues:

  • Run the command below, which will show you the file that contains the registerReceiver function.
  • After running the above command, you will have a clear idea of the package which is using the function. If the packages have latest version, you can update the package or go to the file where the function is used, add Context.RECEIVER_EXPORTED or Context.RECEIVER_NOT_EXPORTED as per your need as a third parameter of the function.
  • react-native-share:
    File path
    : /node_modules/ react-native-share/ android/ src/main/java/ cl/json/ social/ TargetChosenReceiver.java
  • react-native-orientation:
    File path: node_modules/ react-native-orientation/ android/src/ main/java/ com/github/ yamill/ orientation/ OrientationModule.java

Leave a Reply

Your email address will not be published. Required fields are marked *