A coroutine dependency error occurs during the build process
A coroutine dependency error occurs during the build process
Issue
A coroutine dependency error occurs during the build process with the following message.Text
Cause
If the kotlinx-coroutines-core library version is 1.3.5 or later, the kotlin-stdlib library version must be at a certain level or later.Solution
Check whether the kotlin-stdlib library version is v.1.3.70 or later with thegradlew dependencies command. If the version is earlier than v.1.3.70, you need to update it.Deeplink Opens that occur through push notifications using the Braze SDK are not collected
Deeplink Opens that occur through push notifications using the Braze SDK are not collected
Issue
Deeplink Open events that occur through the push notifications generated by the Braze SDK are not collected by Airbridge. Instead, the App Open event is collected.Cause
The Airbridge Android SDK uses thedataString in the action and intent of the Activity to distinguish between Deeplink Open events and App Open events.When a user opens the app through a push notification using the Braze SDK, the app goes through an activity called NotificationTrampolineActivity. This activity handles push notifications, but the dataString is not included in its action and intent, preventing the SDK from determining if it’s a Deeplink Open event or an App Open event.Solution
The problem can be solved using the code snippet below for Airbridge Android SDK versions v2.21.5 and later.The "Manifest merger failed" error occurs during the build process
The "Manifest merger failed" error occurs during the build process
Issue
The “Manifest merger failed” error occurs during the build process.Cause
The Airbridge SDK’sAndroidManifest.xml includes rules to opt out of backing up the Shared Preferences data. The purpose of this rule is to avoid retaining the same Airbridge settings during the reinstallation of the app so that new installs or reinstalls can be detected accurately.Merging Airbridge SDK backup rules with your app backup rules can cause conflicts.Solution
Below are the opt-out rules defined in the Airbridge SDK.Fix conflict with fullBackupContent=“string”
Addingandroid:fullBackupContent="string" to the AndroidManifest.xml file may cause an error like the following.Build Output
- add
xmlns:tools="http://schemas.android.com/tools"to the<manifest>tag - add
tools:replace="android:fullBackupContent"to the<application>tag
AndroidManifest.xml file.Fix conflict with dataExtractionRules=“string resource”
Addingandroid:dataExtractionRules="string resource" to the AndroidManifest.xml file may cause an error like the following.Build Output
- add
xmlns:tools="http://schemas.android.com/tools"to the<manifest>tag - add
tools:replace="android:dataExtractionRules"to the<application>tag
AndroidManifest.xml file.Fix conflict with allowBackup=“false”
Addingandroid:allowBackup="false" to the AndroidManifest.xml file may cause an error like the following.Build Output
- add
xmlns:tools="http://schemas.android.com/tools"to the<manifest>tag - add
tools:replace="android:allowBackup"to the<application>tag
AndroidManifest.xml file.If compileSdkVersion is lower than 31
Theandroid:dataExtractionRules has been added in API Level 31. Therefore, if the compileSdkVersion is lower than 31, an error like the following may occur.Build Output
- add
xmlns:tools="http://schemas.android.com/tools"to the<manifest>tag - add
tools:remove="android:dataExtractionRules"to the<application>tag
AndroidManifest.xml file.For more guidance, refer to the articles below.Airbridge SDK Backup Rule Configuration (SDK below 4.9.0)
Airbridge SDK Backup Rule Configuration (SDK below 4.9.0)
NoticeAirbridge Android SDK 4.9.0 and above do not require backup rule configuration. Only proceed with this step if you are using a version below 4.9.0.
Why Configuration is Needed
The Airbridge Android SDK requires certain data to be excluded from backup to ensure accurate reinstall detection. For SDK versions below 4.9.0, this must be configured manually.Configuration Methods
If android:allowBackup=”…” is included- Add
android:allowBackupto thetools:replaceattribute of the<application>tag inAndroidManifest.xml. If there are other values, separate them with a comma (,). If there are no other values, do not use a comma.
- Add
android:dataExtractionRulesto thetools:replaceattribute of the<application>tag inAndroidManifest.xml. If there are other values, separate them with a comma (,). If there are no other values, do not use a comma.
- Specify the backup rules file in
android:dataExtractionRules="...". Add Airbridge exclusion rules to the backup rules file. (e.g.,res/xml/data_extraction_rules.xml)
- Add
android:fullBackupContentto thetools:replaceattribute of the<application>tag inAndroidManifest.xml. If there are other values, separate them with a comma (,). If there are no other values, do not use a comma.
- Specify the backup rules file in
android:fullBackupContent="...". Add Airbridge exclusion rules to the backup rules file. (e.g.,res/xml/backup_rules.xml) Note thatandroid:fullBackupContent="false"means there is no backup rules file, so you do not need to add the rules below.
Caution
When adding values to thetools:replace attribute of the <application> tag, if there is a space after the comma (,), it may cause build errors in some Android Gradle Plugin (AGP) versions. Please be aware.Resolve Airbridge SDK backup rules merge conflict issue
Resolve Airbridge SDK backup rules merge conflict issue
Issue
If an Airbridge SDK backup rule and a backup rule for a different third-party SDK (e.g., AppsFlyer SDK) overlap, you will see the build error below.Cause
Overlapping of the Airbridge SDK backup rules and third-party SDK backup rules can cause build errors.Solution
Follow these steps to consolidate all SDK backup rules into one file.- Create a backup rules file under the res/xml folder. If a file already exists, only add the Airbridge content.
- For Android 11 and below:
backup_rules.xml
- For Android 11 and below:
- For Android 12 and above:
data_extraction_rules.xml
- Add
android:allowBackupto thetools:replaceattribute of the<application>tag inAndroidManifest.xml. If there are other values, separate them with a comma (,). If there are no other values, do not use a comma.
Caution
When adding values to thetools:replace attribute of the <application> tag, if there is a space after the comma (,), it may cause build errors in some Android Gradle Plugin (AGP) versions. Please be aware.GAID is collected as 00000000-0000-0000-0000-000000000000
GAID is collected as 00000000-0000-0000-0000-000000000000
An error occurs when setting android:allowBackup="false"
An error occurs when setting android:allowBackup="false"
Issue
When settingandroid:allowBackup="false", the following build error appears.Cause
This issue may occur due to differences in the Manifest Merger’s parsing behavior depending on the version of the Android Gradle Plugin (AGP).In certain AGP versions, the parser fails to automatically trim whitespace following a comma (,) when interpreting the tools:replace="..." attribute in AndroidManifest.xml. In this scenario, the string containing the whitespace is incorrectly recognized as a distinct, invalid attribute key. Consequently, the attribute replacement rules may fail to apply, or build errors may occur due to duplicate declarations.Solution
To resolve this issue, remove all spaces within thetools:replace attribute value and perform a Clean Build.