BranchMetrics / cordova-ionic-phonegap-branch-deep-linking-attribution

The Branch Cordova Ionic Phonegap SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/apps/cordova-phonegap-ionic/
MIT License
234 stars 144 forks source link

Latest SDK Updates fail to compile Android #724

Closed itbeyond closed 4 months ago

itbeyond commented 6 months ago

Describe the bug

Once installed with the latest version downloaded directly from github not npm so using the latest 5.7.5 for Android I am not able to compile my app. Using Cordova 12.0.0, Cordova-Android 12.0.1 it comes up as

> Task :app:compileDebugJavaWithJavac FAILED
C:\Projects\xxxx\platforms\android\app\src\main\java\io\branch\BranchSDK.java:25: error: cannot find symbol
import io.branch.referral.BranchViewHandler;
                         ^
  symbol:   class BranchViewHandler
  location: package io.branch.referral
C:\Projects\xxxx\platforms\android\app\src\main\java\io\branch\BranchSDK.java:26: error: package io.branch.referral.ServerRequestGetCPID does not exist
import io.branch.referral.ServerRequestGetCPID.BranchCrossPlatformIdListener;
                                              ^
C:\Projects\xxxx\platforms\android\app\src\main\java\io\branch\BranchSDK.java:31: error: cannot find symbol
import io.branch.referral.util.BranchCPID;
                              ^
  symbol:   class BranchCPID
  location: package io.branch.referral.util
C:\Projects\xxxx\platforms\android\app\src\main\java\io\branch\BranchSDK.java:803: error: cannot find symbol
    protected class BranchCPIDListener implements BranchCrossPlatformIdListener {
                                                  ^
  symbol:   class BranchCrossPlatformIdListener
  location: class BranchSDK
C:\Projects\xxxx\platforms\android\app\src\main\java\io\branch\BranchSDK.java:811: error: cannot find symbol
        public void onDataFetched(BranchCPID branchCPID, BranchError error) {
                                  ^
  symbol:   class BranchCPID
  location: class BranchSDK.BranchCPIDListener
C:\Projects\xxxx\platforms\android\app\src\main\java\io\branch\BranchSDK.java:857: error: package BranchViewHandler does not exist
    protected class BranchViewEventsListener implements BranchViewHandler.IBranchViewEvents {
                                                                         ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors

If I am to revert the gradle dependancy to 5.2.0 and then resysnc gradle and build the code compiles correctly. It appears that in the later SDK the BranchViewHandler does not exist if any versions past 5.2.

Steps to reproduce

  1. create basic hello world app
  2. cordova plugin add https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking-attribution
  3. cordova platform add android@12.0.1
  4. compile in Android Studio - errors as above

Expected behavior

It should compile

SDK Version

any version > 5.2.0

Make and Model

Emulator

OS

Android API 33

Additional Information/Context

No response

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale due to inactivity for 60 days. If this issue is still relevant, please respond with any updates or this issue will be closed in 7 days. If you believe this is a mistake, please comment to let us know. Thank you for your contributions.

github-actions[bot] commented 4 months ago

This issue has been closed due to inactivity. If this issue is still relevant, please reopen it or create a new one. Thank you for your contributions.