Coder Social home page Coder Social logo

branchmetrics / capacitor-branch-deep-links Goto Github PK

View Code? Open in Web Editor NEW
32.0 28.0 41.0 467 KB

Capacitor plugin for branch.io deep links

License: MIT License

Ruby 1.20% Java 33.26% Objective-C 1.96% Swift 32.34% JavaScript 21.08% TypeScript 10.17%
capacitor-plugin capacitor deep-links

capacitor-branch-deep-links's Introduction

capacitor-branch-deep-links's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

capacitor-branch-deep-links's Issues

branch link treated as non branch link IOS

I have implement deep linking in my ionic capacitor app as we need deferred deep linking. I have everything setup in dashboard.

Screenshot (54)

I am running the app with branch test key and I see every test is passed and branch is setup correctly

photo5001795119535466925

When I click deeplink in email or iphone notes app it does opens the app and I see the link which opens the app but I see its not treating the link as branch link

["+clicked_branch_link": 0, "+is_first_session": 0, "+non_branch_link": https://xxx.app.link/ad123zasw?bnc_validate=true]

Because of this deferred deeplinking doesn't work either. I followed the steps

  1. Uninstall app
  2. click deeplink
  3. install app using xcode

But I don't see context being saved for deeplinking. I have verified that I am using correct branch keys and apple team id.

Provided for backwards compatibility for Capacitor v2 plugins. Capacitor v3 plugins should import the plugin directly. This "Plugins" export is deprecated in v3, and will be removed in v4.

Describe the bug

 import { Plugins } from '@capacitor/core';
import { BranchInitEvent } from 'capacitor-branch-deep-links';

const { BranchDeepLinks } = Plugins;

Steps to reproduce

Just paste this: https://help.branch.io/developers-hub/docs/capacitor#initialize-branch

Expected behavior

Need to support Capacitor 4+

SDK Version

5.0.0

Make and Model

Doc issue

OS

Doc issue

Additional Information/Context

Please update the doc to Capacitor 4 syntax.

Ref: https://help.branch.io/developers-hub/docs/capacitor#install-branch

getLatestReferringParams

Describe the feature

In the cordova plugin there is the ability to call the funcion getLatestReferringParams() and retrieve the latest data branchio received. I haven't found a similar functionality on the capacitor plugin.

Add the setRequestMetadata() method to allow integration to services like Mixpanel

Hi

I recently tried to implement Mixpanel and Branch in a Capacitor app, but I couldn't get attribution to work from Branch -> Mixpanel. Mixpanel's docs say that the device id they provide should be sent to Branch in the setRequestMetadata function which is included in the iOS and Android Branch SDKs but not exposed by this library

Branch / Mixpanel docs pertaining to the java/ObjC calls used to make the request: https://help.branch.io/using-branch/page/mixpanel#4-pass-idmetadata-to-branch

The Cordova version of this project includes this function: https://help.branch.io/developers-hub/docs/cordova-phonegap-ionic#link-data-mixpanel-integration

Generating Google Play Console Crash Reports

I'm getting tons of Crash Reports in the Google Play console after setting this up on my Ionic App. It seems to be happening the most with Android 10.

java.lang.RuntimeException:
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6465)
at android.app.ActivityThread.access$1300 (ActivityThread.java:219)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1859)
at android.os.Handler.dispatchMessage (Handler.java:107)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7356)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:930)
Caused by: java.lang.IllegalStateException:
at android.app.ContextImpl.getSharedPreferences (ContextImpl.java:458)
at android.app.ContextImpl.getSharedPreferences (ContextImpl.java:443)
at android.content.ContextWrapper.getSharedPreferences (ContextWrapper.java:178)
at io.branch.referral.PrefHelper. (PrefHelper.java:144)
at io.branch.referral.PrefHelper.getInstance (PrefHelper.java:162)
at io.branch.referral.Branch. (Branch.java:424)
at io.branch.referral.Branch.initInstance (Branch.java:797)
at io.branch.referral.Branch.getBranchInstance (Branch.java:613)
at io.branch.referral.Branch.getInstance (Branch.java:669)
at io.branch.referral.BranchApp.onCreate (BranchApp.java:35)
at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1189)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6460)

upgraded project to capacitor 4, ionic/xcode project will not compile

Screen Shot 2022-09-16 at 7 51 11 AM

### Describe the bug

getting the following errors:

Cannot find type 'BranchQRCode' in scope

Cannot convert value of type '_' to expected argument type 'Stri

both occurring in the branchserice.swift file (of the framework)

Steps to reproduce

  1. create an ionic project that uses capacitor 4
    2.use the component branch deep links 5.0

Expected behavior

expect the project to compile and run

SDK Version

5.0

Make and Model

iphone

OS

13

Additional Information/Context

nothing more to add

Type 'Branch' has no member 'setDMAParamsForEEA'

Describe the bug

On iOS after the last update about setDMAParamsForEEA when I try to build my app in xCode I get this following error

Type 'Branch' has no member 'setDMAParamsForEEA'

Steps to reproduce

1.Try to build any app using the latest version of capacitor-branch-deep-links

Expected behavior

No errors

SDK Version

7.1.0

Make and Model

Simulator iPhone 15 Pro

OS

17.2

Additional Information/Context

No response

Update docs with info on the URI Scheme employed

Thanks so much for this plugin! It's really going to help me out.

I'm confused about what I am going to be putting into the Android URI Scheme and iOS URI Scheme input boxes when using the Capacitor plugin as opposed to the Cordova one?

See image below:
Screenshot 2020-03-17 at 14 43 11

This screen is found in the Branch Dashboard

Android > Error: Session initialization already happened > No deeplink referringParams

Problem

When sending a push notification (in this case via Braze) which hold a deep link on click, if the app in the background, it only opens the application but does not hold any of the referringParams data and shows an error of:

"Warning. Session initialization already happened. To force a new session, set intent extra, "branch_force_new_session", to true."

Screen Shot 2021-10-29 at 1 00 12 pm

If you leave the app to go back into background, then foreground it again, it suddenly has the branch data within the object and works as intended. It is on the first push click and app open (if the app has already been opened and is in the background) that it is empty and fails.

Platform

Android

Code

  • MainActivity.java
public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Additional plugins you've installed go here
    // Ex: registerPlugin(TotallyAwesomePlugin.class);
    registerPlugin(Contacts.class);
    registerPlugin(NativeBiometric.class);
    registerPlugin(BranchDeepLinks.class);
  }

  @Override
  protected void onNewIntent(Intent intent) {
    // super.onNewIntent(intent);
    // this.setIntent(intent);

    this.setIntent(intent);
    super.onNewIntent(intent);

    // handles warning:"session initialization already happened"
    if(intent != null) {
      intent.putExtra("branch_force_new_session", true);
    }
  }
}
  • CustomApplicationClass.java
public class CustomApplicationClass extends MultiDexApplication {
    @Override
    public void onCreate() {
        super.onCreate();
        // Branch logging for debugging
        Branch.enableLogging();
        
        if (SDK_INT >= 24) {
          UserManager um = getApplicationContext().getSystemService(UserManager.class);
          if (um == null || !um.isUserUnlocked()) return;
        }

        // Branch object initialization
        Branch.getAutoInstance(this);
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }
}

Environment setup

  • Capcitor 3
  • Angular 12
  • "capacitor-branch-deep-links": "^4.0.0"

Android: not receiving data while using test key

If I set io.branch.sdkTestMode to true then my app doesn't seem to receive any data when opening a link. All it receives is this:
{"referringParams":{"+clicked_branch_link":false,"+is_first_session":false}}
I've triple checked the keys I'm using, and have set the TestMode meta-data key to true. Anything else I'm missing?

Googling around a bit it seems Branch has had issues with this in the past (2017), but I didn't find anything recent.

I'm still able to develop with the live key. But being able to use the test key would be ideal.

strings.xml

<string name="branch_key">LIVE_KEY</string>
<string name="branch_test_key">TEST_KEY</string>

manifest:

<meta-data android:name="io.branch.sdk.BranchKey" android:value="@string/branch_key" />
<meta-data android:name="io.branch.sdk.BranchKey.test" android:value="@string/branch_test_key" />
<meta-data android:name="io.branch.sdk.TestMode" android:value="true" /> <!-- Set to true to use test key -->

Plugin crashes on ios 12

Although it is mentioned that this plugin is working with ios 12
https://github.com/BranchMetrics/capacitor-branch-deep-links/blob/master/ios/Podfile#L1
it may in fact crash on ios 12.

The reason being this line: https://github.com/BranchMetrics/capacitor-branch-deep-links/blob/master/ios/Podfile#L7
In certain cases, and depending on cache, it may install Branch 1.42.0 which is not compatible with ios 3.

We fixed this (after 3 days of working on it...) by adding the Branch 1.4.1 as dependency:

in the ios/App/Podfile:

target 'app' do
  capacitor_pods
  pod 'Branch', '1.41.0'  # add this line to install the pod good verison that works with ios 12. 
  # Add your Pods here
end

Suggestion - to comply with ios12, the POD version on the above Podfile, the version should be fixed on 1.41.0, as 1.42 is no longer compliant.

Also filed as issue on the Branch framework: BranchMetrics/ios-branch-deep-linking-attribution#1185

Can I use Branch Universal Object?

When I use cordova-branch, I used createBranchUniversalObject method.
In the capacitor version, can I use it?

  const branchObj = await this.createBranchUniversalObject({
    canonicalIdentifier,
    canonicalUrl,
    title,
    contentDescription,
    contentImageUrl,
    contentMetadata
  })

Can't generate deep link Error: BranchDeepLinks does not have web implementation

Describe the bug

Hi When I used "capacitor-branch-deep-links": "5.0.0" in Web.
It is sitll show errors:
image

Is there an updated answer to this question?

Steps to reproduce

I used "capacitor-branch-deep-links": "5.0.0",
It is sitll show errors:
image

Expected behavior

Generated right deep link

SDK Version

5.0.0

Make and Model

chrome

OS

chrome

Additional Information/Context

No response

Branch.io Deep linking not working on iOS 13+. It does not show pop-up to open application

We have added deep-linking integration in our app and using capacitor-branch-deep-links. It is working till iOS 12.1 but in iOS 13+ it does not show a pop-up to open the application on a click of deep-link.

We have also tried forced uri redirect mode but none of these solutions are working.
https://help.branch.io/using-branch/docs/creating-a-deep-link#forced-redirections

Installed Dependencies:
Ionic 5.26.0
@capacitor/cli 2.4.5
@capacitor/core 2.4.5
@capacitor/ios 2.4.5
capacitor-branch-deep-links 3.0.0

IOS Build not passing with version 5.0.0 of the plugin

Describe the bug

when building the app on iOS

▸ Copying Plugin.h
▸ Copying CapacitorBranchDeepLinks-umbrella.h
▸ Processing CapacitorBranchDeepLinks-Info.plist

❌  /app-project/node_modules/capacitor-branch-deep-links/ios/Plugin/BranchService.swift:40:40: cannot find type 'BranchQRCode' in scope

    func getBranchQRCode(branchQRCode: BranchQRCode, buo: BranchUniversalObject, linkProperties: BranchLinkProperties, completion: @escaping (String?, Error?)->(Void)) -> Void {
                ^~~~~~~
❌  /app-project/node_modules/capacitor-branch-deep-links/ios/Plugin/BranchService.swift:46:28: cannot convert value of type '_' to expected argument type 'String?'

                completion(qrCodeString,nil)
                                       ^~~~~~~~~~~~
⚠️  /app-project/node_modules/capacitor-branch-deep-links/ios/Plugin/Plugin.swift:83:14: 'success()' is deprecated: renamed to 'resolve()'

        call.success()
                           ^
⚠️  /app-project/node_modules/capacitor-branch-deep-links/ios/Plugin/Plugin.swift:158:14: 'success()' is deprecated: renamed to 'resolve()'

        call.success()
             ^~~~~~~
❌  /app-project/node_modules/capacitor-branch-deep-links/ios/Plugin/Plugin.swift:253:22: cannot find 'BranchQRCode' in scope

        let qrCode = BranchQRCode()
             ^~~~~~~

❌  /app-project/node_modules/capacitor-branch-deep-links/ios/Plugin/Plugin.swift:272:39: cannot infer contextual base in reference to member 'JPEG'

                qrCode.imageFormat = .JPEG
                     ^~~~~~~~~~~~

❌  /app-project/node_modules/capacitor-branch-deep-links/ios/Plugin/Plugin.swift:274:39: cannot infer contextual base in reference to member 'PNG'

                qrCode.imageFormat = .PNG

Steps to reproduce

  1. Add capacitor-branch-deep-links version 5.0.0 to your capacitor app (capacitor v4)
  2. npx cap sync
  3. open xcode, build the app on a device or simulator

Expected behavior

you should be able to build an app with this plugin latest version on iOS and capacitor 4

SDK Version

5.0.0

Make and Model

any simulator or actual device

OS

ios

Additional Information/Context

No response

SDK missing AdServices import - iOS

A recent update to the SDK has removed the AdServices import, which is breaking iOS builds. Manually setting

pod 'Branch', '1.38.0'
has fixed it for now.

Android: undefined Intent

Per the readme, I added:

+   @Override
+   protected void onNewIntent(Intent intent) {
+     this.setIntent(intent);
+     super.onNewIntent(intent);
+   }

to my activity, and now I see build errors like:

   protected void onNewIntent(Intent intent) {
                              ^
  symbol:   class Intent
  location: class MainActivity

Is the README incomplete? Maybe missing an import statement?

Updates to Android Setup Documentation

Just went through the Android setup documentation for this plugin, located here: https://help.branch.io/developers-hub/docs/capacitor

I noticed a few discrepancies/opportunities for clarification for someone like me that has no native Android knowledge:

  1. In the first Android bullet point "If your app is in the Google Play Store, update build.gradle...". It would be helpful to highlight that the correct file is android/app/build.gradle and NOT android/build.gradle
  2. Would be helpful to know where to put CustomApplicationClass.java
  3. In the CustomApplicationClass.java section, the filename indicated at the top of the code snippet refers incorrectly AndroidManifest.xml.

Thought this might be best shared here but let me know if I should send this somewhere else.

no setup docs for old versions

Please refer to [Branch's SDK Documentation for Capacitor](https://help.branch.io/developers-hub/docs/capacitor).

...only links to the current version of documentation. So we lose all history of setup instructions as the v4 ages out and setup changes.

It would better if setup instructions existed in the repo since setup has changed drastically over various versions.

[android] Outdated configuration tutorial in readme (?)

The official branch documentation tells you to install a set of dependencies. As seen in their documentation:

dependencies {
    ...
    // required for all Android apps
    implementation 'io.branch.sdk.android:library:5.+'
    // required if your app is in the Google Play Store (tip: avoid using bundled play services libs)
    implementation 'com.google.firebase:firebase-appindexing:19.0.0'
    implementation 'com.google.android.gms:play-services-ads-identifier:16+'
    // optional
    // Chrome Tab matching (enables 100% guaranteed matching based on cookies)
    implementation 'androidx.browser:browser:1.0.0'
    // Replace above with the line below if you do not support androidx
    // implementation 'com.android.support:customtabs:28.0.0'
    ...
}

This differs pretty much from what the docs of this library are stating.

Is that intentional? Or is this a mistake?

Problems with play-services-ads version

Describe the bug

Not long time ago Google Play started to show message about play-services-ads and play-services-ads-lite versions sunset
This version is scheduled to sunset on June 30th 2023. See https://developers.google.com/admob/android/deprecation for more information.
In documentation version 19.4.0 is specified.
I've tried update it to latest but app is crashing with error

******************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
* should follow the instructions here:                                       *
* https://googlemobileadssdk.page.link/admob-android-update-manifest         *
* to add a valid App ID inside the AndroidManifest.                          *
* Google Ad Manager publishers should follow instructions here:              *
* https://googlemobileadssdk.page.link/ad-manager-android-update-manifest.   *
******************

I see that I have to add AdMob app ID, but I'm not sure what it is, where I shoult get it and does it requred at all.

Steps to reproduce

  1. Update com.google.android.gms:play-services-ads:19.4.0 to the latest version

Expected behavior

SDK Version

5.0.0

Make and Model

Xiaomi 10T Pro

OS

Android

Additional Information/Context

No response

Capacitor BranchDeepLinks.addListener is not working as a listener

Describe the bug

The addListener function is not working as a listener meaning that if new refferingParams arrive to App you will have to call again the BranchDeepLinks.addListener function in order to read them.

Steps to reproduce

Just initialize

        BranchDeepLinks.addListener("init", (event: BranchInitEvent) => {
          console.log("Deep Link branch Data:", event.referringParams);
        });

With your app opened and initialized just try Browser.open({url: "your branch url"}). The listener will never detect the new data.

Expected behavior

The addListener function should detect new data without the need of calling the function everytime you know new data will arrive. Otherwise the function (addListener) is missnamed and missleading.

SDK Version

7.0.0

Make and Model

Any android

OS

Android 13

Additional Information/Context

No response

Please update documentation

Describe the bug

Please update documentation at https://help.branch.io/developers-hub/docs/capacitor (and keep version history of it). For example, Android Branch SDK dependency type changed from implementation to api.

P.s. tried to report this as a documentation issue but the button 'Suggest edits' is not on the documentation page :-/

Steps to reproduce

None

Expected behavior

None

SDK Version

5

Make and Model

None

OS

None

Additional Information/Context

No response

install_referrer intents removed on March 1, 2020

I received the following information from Branch via Email and I'm wondering if any action will be needed for this plugin. Is there any action that needs to be taken on this end?

Message

A couple of months ago, Google announced that they will stop broadcasting install_referrer intents on March 1, 2020. Branch uses this data to help power our deep linking and attribution services on Android devices.

Fortunately, Google has also introduced the Play Install Referrer API to provide the same data. This API provides better performance, and there is a good chance it is already configured in your app. However, Google has recently contacted several Branch customers about this, so we wanted to proactively reach out and help you confirm your configuration in advance of the cutoff date.

REQUIRED ACTIONS

Branch Android SDK: please do EITHER of the following for your Android app:

  1. Ensure you've linked the Play Install Referrer Library as a Gradle dependency. To do this, please add this directive to your build.gradle file (it is not necessary to implement any of the other steps on this page, as the Branch SDK will handle the rest for you).

OR

  1. Update to the most recent version of the SDK (v4.3.2), which bundles the Play Install Referrer Library automatically.

TUNE Android SDK: Please update to the most recent version of the SDK (v6.1.2, currently only available on JCenter). The TUNE Android SDK already bundles the Play Install Referrer Library, but older versions contain a rare bug that can cause a background thread to pause for up to 60 seconds while waiting for install_referrer data to be returned.

In addition, we recommend confirming that the following entry has been removed from your AndroidManifest.xml file:

Branch SDK

<receiver android:name="io.branch.referral.InstallListener" android:exported="true">
   <intent-filter>
   <action android:name="com.android.vending.INSTALL_REFERRER" />
   </intent-filter>
</receiver>

TUNE SDK

<receiver android:name="com.tune.TuneTracker">
    <intent-filter>
    <action android:name="com.android.vending.INSTALL_REFERRER" />
    </intent-filter>
</receiver>

If you have any questions, please feel free to reach out to [email protected].

Sincerely,

The Branch Team

Android Crash when calling .showShareSheet with Plugin Version 3.0.0

Hello!

I've already implemented this plugin and it works perfectly for iOS. For Android, opening branch links works but sharing does not. I am getting a fatal native crash and not sure where to start. I've triple checked all of the implementation steps for Android and it seems like things are in order, but in logcat I see this crash when calling BranchDeepLink.showShareSheet().

Serious error executing plugin
java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:99)
	at com.getcapacitor.Bridge$1.run(Bridge.java:542)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.app.Activity.getResources()' on a null object reference
	at co.boundstate.BranchDeepLinks.getShareSheetStyle(BranchDeepLinks.java:268)
	at co.boundstate.BranchDeepLinks.showShareSheet(BranchDeepLinks.java:121)
	... 7 more

Any ideas where to start?

ionic info

Ionic:

   Ionic CLI                     : 6.12.3 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.5.1
   @angular-devkit/build-angular : 0.1100.3
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 10.0.8
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI   : 2.4.4
   @capacitor/core : 2.4.4

Utility:

   cordova-res : 0.15.2
   native-run  : 1.3.0

System:

   NodeJS : v10.15.3 (/usr/local/bin/node)
   npm    : 6.13.4
   OS     : macOS Big Sur
package.json
"capacitor-branch-deep-links": "^3.0.0",

Clarify Documentation

Can you please clarify this statement in the Android setup documentation.

Declare BranchApp as your application class in src/main/AndroidManifest.xml:

  <application
+     android:name="io.branch.referral.BranchApp"

Is android:name supposed too explicitly be "io.branch.referral.BranchApp" or is it supposed to be the name of your specific app? When I enter this in my AndroidManfest.xml file it tells me that it doesn't exist. However, the deep links still work and the app compiles.

iOS Network Request Invalid

I am receiving an undescriptive error message that I'm struggling to debug during init.

I would really appreciate help, thank you.

image

Here is my AppDelegate.swift

import UIKit
import Capacitor
import Branch

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

  var window: UIWindow?

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
    Branch.setUseTestBranchKey(true) // if you are using the TEST key
    Branch.getInstance().enableLogging() // enable logging
    Branch.getInstance().initSession(launchOptions: launchOptions)
    return true
  }

  func applicationWillResignActive(_ application: UIApplication) {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
  }

  func applicationDidEnterBackground(_ application: UIApplication) {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  }

  func applicationWillEnterForeground(_ application: UIApplication) {
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
  }

  func applicationDidBecomeActive(_ application: UIApplication) {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
  }

  func applicationWillTerminate(_ application: UIApplication) {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  }

  func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
    // Called when the app was launched with a url. Feel free to add additional processing here,
    // but if you want the App API to support tracking app url opens, make sure to keep this call
    Branch.getInstance().application(app, open: url, options: options)
    return ApplicationDelegateProxy.shared.application(app, open: url, options: options)
  }
  
  func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
    // Called when the app was launched with an activity, including Universal Links.
    // Feel free to add additional processing here, but if you want the App API to support
    // tracking app url opens, make sure to keep this call
    Branch.getInstance().continue(userActivity)
    return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
  }

  override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
    super.touchesBegan(touches, with: event)

    let statusBarRect = UIApplication.shared.statusBarFrame
    guard let touchPoint = event?.allTouches?.first?.location(in: self.window) else { return }

    if statusBarRect.contains(touchPoint) {
      NotificationCenter.default.post(name: .capacitorStatusBarTapped, object: nil)
    }
  }

  func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    NotificationCenter.default.post(name: .capacitorDidRegisterForRemoteNotifications, object: deviceToken)
  }

  func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
    NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error)
  }

  func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    Branch.getInstance().handlePushNotification(userInfo)
  }

}

Here is my imports & calling of addListener's as seen in the set up docs

import { BranchDeepLinks, BranchInitEvent } from 'capacitor-branch-deep-links';

console.log("branch.io init begins...")
BranchDeepLinks.addListener('init', (BranchInitEvent) => {
  // Retrieve deeplink keys from 'referringParams' and evaluate the values to determine where to route the user
  // Check '+clicked_branch_link' before deciding whether to use your Branch routing logic
  console.log("branchdeeplinks event init: ", BranchInitEvent);
});
  
BranchDeepLinks.addListener('initError', (error) => {
  console.error("branchdeeplinks initError: ",  error);
});
console.log("branch.io init ends...")

Finally, here is my package.json

{

  "name": "cardTwister",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "@capacitor-community/firebase-analytics": "^1.0.1",
    "@capacitor-community/sqlite": "^3.4.1-3",
    "@capacitor/android": "^3.4.3",
    "@capacitor/app": "^1.1.1",
    "@capacitor/cli": "^3.4.3",
    "@capacitor/core": "^3.4.3",
    "@capacitor/filesystem": "^1.1.0",
    "@capacitor/ios": "^3.4.3",
    "@capacitor/splash-screen": "^1.2.2",
    "@ionic-native/core": "^5.23.0",
    "@ionic-native/google-analytics": "^4.20.0",
    "@ionic-native/in-app-purchase": "^5.24.0",
    "@ionic-native/in-app-purchase-2": "^5.36.0",
    "@ionic-native/keyboard": "^5.35.0",
    "@ionic-native/launch-review": "^5.24.0",
    "@ionic-native/onesignal": "^5.23.0",
    "@ionic-native/screen-orientation": "^5.19.1",
    "@ionic/core": "^4.11.7",
    "@ionic/vue": "0.0.9",
    "@robingenz/capacitor-background-task": "^1.0.1",
    "@sentry/browser": "^5.15.5",
    "@sentry/integrations": "^5.15.5",
    "apollo-boost": "^0.4.9",
    "axios": "^0.26.0",
    "capacitor-branch-deep-links": "^4.1.1",
    "cordova-launch-review": "^4.0.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-purchase": "^10.6.1",
    "cordova-plugin-screen-orientation": "^3.0.2",
    "core-js": "^3.21.1",
    "es6-promise-plugin": "^4.2.2",
    "graphql": "^15.5.0",
    "jetifier": "^1.6.6",
    "onesignal-cordova-plugin": "^2.11.1",
    "rxjs": "^7.5.4",
    "vue": "^2.6.10",
    "vue-apollo": "^3.0.7",
    "vue-router": "^3.1.3",
    "vue2-touch-events": "^3.2.2",
    "vuex": "^3.1.2"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^4.1.0",
    "@vue/cli-service": "^4.1.0",
    "node-sass": "^4.13.1",
    "node-sass-magic-importer": "^5.3.2",
    "sass-loader": "^8.0.2",
    "vue-sqlite-hook": "^2.0.0-alpha.1",
    "vue-template-compiler": "^2.6.10"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "rules": {},
    "parserOptions": {
      "parser": "babel-eslint"
    }
  },
  "browserslist": [
    "> 1%",
    "last 2 versions"
  ]
}

Deep Linking Fails with Empty Referring Parameters

Describe the bug

  BranchDeepLinks.addListener('init', (event: BranchInitEvent) => {
        alert(JSON.stringify(event.referringParams))
    
     //referringParams are empty
   })

here is how i generate a shortUrl that contains token

  async generateBranchLink() {
    try {
      let user = await this.storageService.get('user');

      var properties = {
        $match_duration: 2000,
        custom_string: 'data',
        custom_boolean: true,
        $custom_data: JSON.stringify({token: user.share_token}),
      };

      let res = await BranchDeepLinks.generateShortUrl({properties});
      return res.url;
    } catch (err) {
      console.error('Error generating Branch link:', err);
      throw err;
    }
  }

Steps to reproduce

1.Implement capacitor-branch-deep-links as per the documentation
2.Generate a deep link with custom user share token
3.Attempt to open the app through the generated deep link.

Expected behavior

The app opens via the deep link, but all parameters that were appended to the deep link URL are received as empty. This behavior is consistent across different devices and platforms.

SDK Version

7.1.0

Make and Model

Iphone 12 Pro

OS

iOS 17.3.1

Additional Information/Context

No response

Android: BranchDeepLinks does not have web implementation

I'm getting BranchDeepLinks does not have web implementation when I built a release .apk from android studio.
But when I just hit run it works perfectly.
Any idea why this is happening with the release builds only.?

Ionic:

   Ionic CLI                     : 6.12.3 (/home/atish/.nvm/versions/node/v14.13.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.6.5
   @angular-devkit/build-angular : 0.1102.10
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 11.2.10
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI   : 2.4.2
   @capacitor/core : 2.4.6

Utility:

   cordova-res                          : not installed
   native-run (update available: 1.3.0) : 1.2.2

System:

   NodeJS : v14.13.0 (/home/atish/.nvm/versions/node/v14.13.0/bin/node)
   npm    : 6.14.8
   OS     : Linux 5.8

android intent filter

Hi Mike,

Excellent plugin - extremely well put together. Thanks for sharing.

Quick question. Using latest capacitor 1.3.0, my AndroidManifest.xml already has this:

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data android:host="@string/custom_url_scheme" android:scheme="http"/>
  <data android:host="@string/custom_url_scheme" android:scheme="https"/>
</intent-filter>

That looks a lot like the intent-filter the README says to add. Do we really need a new intent filter or should the existing one be modified to include these data attributes?

<data android:scheme="https" android:host="xxxx.app.link" />
<data android:scheme="https" android:host="xxxx-alternate.app.link" />

Android Fatal Error - "You need to use a Theme.AppCompat theme"

I have followed the installation instructions found here: https://help.branch.io/developers-hub/docs/capacitor for Android precisely

When trying to run the app on on an emulator in Android Studio, the app will not start (message saying the app "keeps stopping")

I'm met with the following logs:

image

Then just below is the following:

2022-03-30 09:58:21.551 8066-8066/com.aks.cardTwist E/m.aks.cardTwis: Invalid ID 0x00000000.
2022-03-30 09:58:21.554 8066-8066/com.aks.cardTwist D/AndroidRuntime: Shutting down VM
2022-03-30 09:58:21.557 8066-8066/com.aks.cardTwist E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.aks.cardTwist, PID: 8066
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aks.cardTwist/com.aks.cardTwister.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
        at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:843)
        at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:806)
        at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:693)
        at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
        at com.getcapacitor.BridgeActivity.onCreate(BridgeActivity.java:28)
        at com.aks.cardTwister.MainActivity.onCreate(MainActivity.java:22)
        at android.app.Activity.performCreate(Activity.java:7994)
        at android.app.Activity.performCreate(Activity.java:7978)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:223) 
        at android.app.ActivityThread.main(ActivityThread.java:7656) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 

Package android.support.annotation does not exist

node_modules\capacitor-branch-deep-links\android\src\main\java\co\boundstate\BranchDeepLinks.java:5: error: package android.support.annotation does not exist
import android.support.annotation.Nullable;
                                 ^
node_modules\capacitor-branch-deep-links\android\src\main\java\co\boundstate\BranchDeepLinks.java:21: error: cannot find symbol
    @Nullable
     ^
  symbol:   class Nullable
  location: class BranchDeepLinks
2 errors

Deeplink launches twice or more in iOS

HI there

Having an issue where a deeplink will fire twice (but sometimes even multiple times) after opening a Branch link in iOS. My process is as follows:

  • Click a Branch link
  • It opens my app. I handle the event in my JS and route through my app using the deeplink path.
  • I do something to cause the app to lose focus, such as going to the homescreen or opening the notification shade.
  • On returning focus to the app, the Branch link fires again and the navigation happens a second time.

As far as I can tell, this does not happen on Android. I'm thinking I have some piece of iOS setup wrong, but I've checked everything against the docs and there is no glaring omission. If I have gone wrong somewhere, what could it be?

Issue with version 3.0.0

After updating to Version 3.0.0 of the capacitor plugin, I always get the following error:

Serious error executing plugin
    java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Method.invoke(Native Method)
        at com.getcapacitor.PluginHandle.invoke(PluginHandle.java:99)
        at com.getcapacitor.Bridge$1.run(Bridge.java:526)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:237)
        at android.os.HandlerThread.run(HandlerThread.java:67)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference
        at io.branch.referral.BranchUrlBuilder.<init>(BranchUrlBuilder.java:56)
        at io.branch.referral.BranchShortLinkBuilder.<init>(BranchShortLinkBuilder.java:15)

I adjusted my app like mentioned in the Android setup: https://github.com/BranchMetrics/capacitor-branch-deep-links#android-setup

After adding

activity = getActivity();

to BranchDeepLinks.java it works again

Android > App Crash > Additional functions

When using plugin v3.0.0 my app crashes on Android with no error messages when calling functions:

  • BranchDeepLinks.generateShortUrl()
  • BranchDeepLinks.showShareSheet()

I haven't tried some other functions other than those two, so some of the others might crash the app too.

When downgrading to v2.0.0 there are no issues and everything works as expected.

Additional environment information:

  • Ionic 5
  • Capacitor
  • Angular 11

iOS Status 200 error (null)

Describe the bug

iOS v16.5 physical device.
Have a deep link coming in from Slack
the API call is triggered and I can see the data is returned, but the event listener, whilst triggered, only spits out {}

Physical device: v16.5.1, iphone8
xcode: v14.3.1
capacitor-branch-deep-links: v5.0.0
capacitor: v4.1.1
ios BranchSDK: v2.2.0
branch configuration: test
Branch.setUseTestBranchKey(true)

Steps to reproduce

  1. build an app with the above versions
  2. try to click a test link on a device
  3. the link routes the user to the correct application
  4. then observe in the xcode logs that the API call returns the data and Status 200 error (null)
  5. The event listener will be triggered and no data will be returned: {"referringParams":{}}

Expected behavior

Expected: that referringParams is actually populated with the data from the API.

SDK Version

5.0.0

Make and Model

iphone 8

OS

16.5.1

Additional Information/Context

Request (from xcode logs)

2023-07-18 16:58:33.872399+0100 App[2327:170281] [branch.io] BNCServerInterface.m(413) Debug: Body: {
    "ad_tracking_enabled" = 0;
    "anon_id" = "30AA3207-5C11-40A9-9B3A-B10DBEB5B0AE";
    "app_version" = "1.2.2";
    "apple_ad_attribution_checked" = 0;
    "apple_testflight" = 1;
    "branch_key" = "key_test_xxx";
    brand = Apple;
    build = 20F75;
    cd =     {
        mv = "-1";
        pn = "com.xxx.app";
    };
    "connection_type" = wifi;
    country = US;
    "cpu_type" = 16777228;
    debug = 0;
    "device_carrier" = "--";
    environment = "FULL_APP";
    "facebook_app_link_checked" = 0;
    "first_install_time" = 1668595230650;
    "hardware_id" = "xxxxxx";
    "hardware_id_type" = "vendor_id";
    instrumentation =     {
        "/v1/install-brtt" = 480;
    };
    "ios_bundle_id" = "com.xxx.app";
    "ios_vendor_id" = "xxxx";
    "is_hardware_id_real" = 1;
    language = en;
    "lastest_update_time" = 1689695896000;
    "latest_install_time" = 1689695899141;
    "local_ip" = "192.168.1.88";
    locale = "en_US";
    metadata =     {
        "skan_time_window" = "5184000.000000";
    };
    model = "iPhone10,4";
    "opted_in_status" = "not_determined";
    os = iOS;
    "os_version" = "16.5.1";
    "previous_update_time" = 1689695896000;
    "randomized_bundle_token" = 1209879206964938646;
    "randomized_device_token" = 1209879206876611234;
    retryNumber = 0;
    "screen_dpi" = 2;
    "screen_height" = 1334;
    "screen_width" = 750;
    sdk = "ios2.1.2";
    "universal_link_url" = "https://share-test.xxx.com/xxxxxxxxxx";
    update = 0;
    "uri_scheme" = beetl;
    "user_agent" = "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148";
}

Response (from xcode logs)

JSON: {
    "device_carrier": "--",
    "os_version": "16.5.1",
    "ios_bundle_id": "com.xxx.app",
    "debug": false,
    "screen_dpi": 2,
    "country": "US",
    "is_hardware_id_real": true,
    "opted_in_status": "not_determined",
    "locale": "en_US",
    "anon_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "ad_tracking_enabled": false,
    "sdk": "ios2.1.2",
    "instrumentation": {
        "/v1/install-brtt": "480"
    },
    "uri_scheme": "xxx",
    "environment": "FULL_APP",
    "metadata": {
        "skan_time_window": "5184000.000000"
    },
    "connection_type": "wifi",
    "previous_update_time": 1689695896000,
    "retryNumber": 0,
    "universal_link_url": "https://share-test.xxx.com/xxxxxxxxxxxxx",
    "facebook_app_link_checked": false,
    "lastest_update_time": 1689695896000,
    "local_ip": "xxx.xxx.xxx.xxx",
    "brand": "Apple",
    "update": 0,
    "cd": {
        "pn": "com.xxx.app",
        "mv": "-1"
    },
    "cpu_type": "16777228",
    "screen_height": 1334,
    "apple_ad_attribution_checked": false,
    "model": "iPhone10,4",
    "randomized_device_token": "1209879206876611234",
    "branch_key": "key_test_xxx",
    "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
    "first_install_time": 1668595230650,
    "hardware_id": "xxxxxxxxxxxxxxxxxxxxxxx",
    "os": "iOS",
    "hardware_id_type": "vendor_id",
    "latest_install_time": 1689695899141,
    "randomized_bundle_token": "1209879206964938646",
    "screen_width": 750,
    "build": "20F75",
    "language": "en",
    "ios_vendor_id": "xxxxxxxxxxxxxxxxxxxxxxx",
    "app_version": "1.2.2",
    "apple_testflight": true
}.
2023-07-18 16:58:33.873546+0100 App[2327:170281] [branch.io] BNCNetworkService.m(207) Debug: Network start operation https://api2.branch.io/v1/open.
2023-07-18 16:58:34.067984+0100 App[2327:170282] [branch.io] BNCNetworkService.m(202) Debug: Network finish operation https://api2.branch.io/v1/open 0.195s. Status 200 error (null).
{
    "data": "{\"$og_title\":\":raised_hands: xxx\",\"$deeplink_path\":\"path/myPathOfPaths\",\"~creation_source\":0,\"$og_description\":\"xxx\",\"+click_timestamp\":1689695914,\"$og_image_url\":\"xxx\",\"+match_guaranteed\":true,\"$desktop_url\":\"xxx\",\"event_id\":\"99ab03ca-c4da-4e3a-8871-7dbd522439ce\",\"+clicked_branch_link\":true,\"~id\":1209467844585220182,\"+is_first_session\":false,\"~referring_link\":\"xxx\",\"$android_url\":\"xxx\",\"$ios_url\":\"xxx\"}",
    "link": "https://share-test.xxx.com/a/key_test_xxxxxxxxxxxxxxxxxx?%24randomized_bundle_token=1209879206964938646",
    "randomized_bundle_token": "1209879206964938646",
    "randomized_device_token": "1209879206876611234",
    "session_id": "1209879232185378735"
}.
2023-07-18 16:58:34.069251+0100 App[2327:170282] [branch.io] BNCServerInterface.m(496) Debug: Server returned: [3d8978b9-c630-4a25-8cf9-4a2b95d3aba4-2023071815] Status: 200; Data: {
    data = "{\"$og_title\":\"\xxxxxxxxxxxx\",\"$deeplink_path\":\"path/myPathOfPaths\",\"~creation_source\":0,\"$og_description\":\"xxxxxx\",\"+click_timestamp\":1689695914,\"$og_image_url\":\"xxxxxxxx\",\"+match_guaranteed\":true,\"$desktop_url\":\"xxxxxxxxxxxxxxx\",\"event_id\":\"99ab03ca-c4da-4e3a-8871-7dbd522439ce\",\"+clicked_branch_link\":true,\"~id\":1209467844585220182,\"+is_first_session\":false,\"~referring_link\":\"https://share-test.xxxx.com/xxxxxxxxxx\",\"$android_url\":\"xxxxx\",\"$ios_url\":\"xxxxx\"}";
    link = "https://share-test.xxxxxxx.com/a/key_test_xxxxx?%24randomized_bundle_token=1209879206964938646";
    "randomized_bundle_token" = 1209879206964938646;
    "randomized_device_token" = 1209879206876611234;
    "session_id" = 1209879232185378735;
}.

Plugin incompatible with Gradle 8

Describe the bug

As part of the Capacitor 5 upgrade, I switched my Android setup to use Gradle 8. Am unable to compile the project due to incompatibility of this plugin with gradle 8 (works fine with gradle 7.x)

Steps to reproduce

  1. Specify gradle 8.0.2 in build.gradle
  2. Try to build your project which uses this plugin
  3. The following error is seen in the build log
    Seeing this in the log while building my project:
    `A problem occurred configuring project ':capacitor-branch-deep-links'.

defaultConfig contains custom BuildConfig fields, but the feature is disabled.

  • Try:

Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

  • Exception is:
    org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':capacitor-branch-deep-links'.
    at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:84)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:77)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:55)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$NotifyAfterEvaluate.run(LifecycleProjectEvaluator.java:255)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:114)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:388)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$fromMutableState$1(DefaultProjectStateRegistry.java:411)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withReplacedLocks(DefaultWorkerLeaseService.java:345)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:411)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:387)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:100)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:72)
    at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:792)
    at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:156)
    at ....`

Expected behavior

The project should build without any errors

SDK Version

5.0.0

Make and Model

Oppo A74

OS

Android 13

Additional Information/Context

Using Android Studio Flamingo | 2022.2.1 Patch 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.