React Native Low Version(<0.74.0) Upgrade targetSdkVersion to 34
1. Make Sure the compileSdkVersion
is correct.
Cause if you don’t have the correct version of compileSdkVersion
, the Context.RECEIVER_EXPORTED
will not found.
1 | buildscript { |
2. Rewrite the registerReceiver
in MainApplication.java
Make sure the registerReceiver
is override before the onCreate
function.
1 | // ... |
3. Clean Project and Rebuild the apk package
Reference here: React Native App Crashes — On upgrading to targetSdkVersion 34(Android 14)