Starting with RN 0.60, AndroidX will be enabled:
android.useAndroidX=true
android.enableJetifier=true
https://github.com/facebook/react-native/blob/v0.60.0-rc.0/template/android/gradle.properties
This will lead to a series of compile errors with this repository as it still uses the old support library:
node_modules/react-native-branch/android/src/main/java/io/branch/rnbranch/RNBranchModule.java:9: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
^
node_modules/react-native-branch/android/src/main/java/io/branch/rnbranch/RNBranchModule.java:10: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
node_modules/react-native-branch/android/src/main/java/io/branch/rnbranch/RNBranchModule.java:597: error: cannot find symbol
public static LinkProperties createLinkProperties(ReadableMap linkPropertiesMap, @Nullable ReadableMap controlParams){
^
symbol: class Nullable
location: class RNBranchModule
node_modules/react-native-branch/android/src/main/java/io/branch/rnbranch/RNBranchModule.java:851: error: cannot find symbol
@Nullable
^
symbol: class Nullable
location: class RNBranchModule
node_modules/react-native-branch/android/src/main/java/io/branch/rnbranch/RNBranchModule.java:965: error: cannot find symbol
public void sendRNEvent(String eventName, @Nullable WritableMap params) {
^
symbol: class Nullable
location: class RNBranchModule
node_modules/react-native-branch/android/src/main/java/io/branch/rnbranch/RNBranchModule.java:188: error: cannot find symbol
LocalBroadcastManager.getInstance(mmActivity).sendBroadcast(broadcastIntent);
^
symbol: variable LocalBroadcastManager
node_modules/react-native-branch/android/src/main/java/io/branch/rnbranch/RNBranchModule.java:284: error: cannot find symbol
LocalBroadcastManager.getInstance(reactContext).registerReceiver(mInitSessionEventReceiver, new IntentFilter(NATIVE_INIT_SESSION_FINISHED_EVENT));
^
symbol: variable LocalBroadcastManager
location: class RNBranchModule
node_modules/react-native-branch/android/src/main/java/io/branch/rnbranch/RNBranchModule.java:289: error: cannot find symbol
LocalBroadcastManager.getInstance(getReactApplicationContext()).unregisterReceiver(mInitSessionEventReceiver);
^
symbol: variable LocalBroadcastManager
location: class RNBranchModule
Thanks for the heads up. We'll have to test and release a patch.
Further information: https://github.com/react-native-community/discussions-and-proposals/issues/129
@jdee Any ETA for that patch?
@danilobuerger do you have any workaround to fix that for now?
@brunobar79 @JoaquinBeceiro @danilobuerger Hi guys! We fixed the problem: https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution/pull/464
While we are waiting for merge PR you can use the library like it (_package.json_):
"react-native-branch": "git://github.com/startmatter/react-native-branch-deep-linking-attribution.git#fix\/migrate_to_androidX"
@jdee 0.60 has been released. It would be awesome if you could review the PR made by @maximzah .
The PR seems straightforward enough, is there a reason for the delay?
Most helpful comment
@brunobar79 @JoaquinBeceiro @danilobuerger Hi guys! We fixed the problem: https://github.com/BranchMetrics/react-native-branch-deep-linking-attribution/pull/464
While we are waiting for merge PR you can use the library like it (_package.json_):