React-native-branch-deep-linking-attribution: In RNBranchModule.js, cannot resolve symbol `ADD_TO_CART` on Android

Created on 6 Sep 2019  路  4Comments  路  Source: BranchMetrics/react-native-branch-deep-linking-attribution

Build compilation fails at in RNBranchModule.js

constants.put(ADD_TO_CART_EVENT, BranchEvent.ADD_TO_CART);
constants.put(ADD_TO_WISHLIST_EVENT, BranchEvent.ADD_TO_WISH_LIST);
constants.put(PURCHASED_EVENT, BranchEvent.PURCHASED);
constants.put(PURCHASE_INITIATED_EVENT, BranchEvent.PURCHASE_STARTED);
constants.put(REGISTER_VIEW_EVENT, BranchEvent.VIEW);
constants.put(SHARE_COMPLETED_EVENT, BranchEvent.SHARE_COMPLETED);
constants.put(SHARE_INITIATED_EVENT, BranchEvent.SHARE_STARTED);

error: cannot find symbol variable ADD_TO_CART
error: cannot find symbol variable PURCHASED
error: cannot find symbol variable VIEW
error: cannot find symbol variable SHARE_STARTED

Commenting out the above code will fix the issue, compilations would be successful and everything works fine.

Any idea what's the issue?

Most helpful comment

@SurajMDurgad Upgrading to v3.1.1 solved this for me. @squalvj haven't seen this issue on iOS?

All 4 comments

it happen also in ios, i suspect it because i try to install the library and link it, it always error on iOS, and the library is not linked to my project.. any idea ?

@SurajMDurgad Upgrading to v3.1.1 solved this for me. @squalvj haven't seen this issue on iOS?

@supraja-branch I'd also like to add that upgrading to v3.1.1 may break your current iOS build with the following error "'Branch/Branch.h' file not found". If you are NOT using CocoaPods for branch e.g. ../node_modules/branch.... Add pod 'Branch', '~> 0.27.0' to your podfile and run pod install.

Let me know if you still have this issue. Then we can close this (@echo-branch)

This was fixed a while back.

Was this page helpful?
0 / 5 - 0 ratings