Troubleshooting
This page can be helpful if you encounter some build issues with DriveKit SDK in your app.
dataExtractionRules
property merge issue
dataExtractionRules
property merge issueIf an error message appeared when building your app is something like:
Error: Attribute application@dataExtractionRules value=(@xml/data_extraction_rules) from AndroidManifest.xml:12:9-65 is also present at [com.drivequant.drivekit:drivekit-core:x.x.x] AndroidManifest.xml:13:9-56 value=(@xml/backup_rules). Suggestion: add 'tools:replace="android:dataExtractionRules"' to element at AndroidManifest.xml:9:5-31:19 to override.
It's a backup rules merging issue with DriveKit SDK rules and your app and/or another external library you use.
To resolve this, update your AndroidManifest.xml
file:
Then find the related backup rules of your app or the external library and create the file merged_data_extraction_rules.xml
in the src/main/res/xml
folder:
fullBackupContent
property merge issue
fullBackupContent
property merge issueIf an error message appeared when building your app is something like:
Error: Attribute application@fullBackupContent value=(@xml/app_backup_exclusion) from [com.anotherSdk.library:xxx:x.y.z] AndroidManifest.xml:22:18-76 is also present at [com.drivequant.drivekit:drivekit-core:x.x.x] AndroidManifest.xml:11:9-69 value=(@xml/backup_rules_pre_android_12). Suggestion: add 'tools:replace="android:fullBackupContent"' to element at AndroidManifest.xml:42:3-72:17 to override.
It's a backup rules merging issue with DriveKit SDK rules and your app and/or another external library you use.
To resolve this, update your AndroidManifest.xml
file:
Then find the related backup rules of your app or the external library and create the file merged_backup_rules.xml
in the src/main/res/xml
folder:
If you have both dataExtractionRules and fullBackupContent merge issues, you have to declare the two attrbutes as follows:
BackupAgent
merge issue
BackupAgent
merge issueIf an error message appeared when building your app looks like:
It's because DriveKit SDK is using the BackupAgent
to restore some user information when the user has reinstalled the app.
DriveKit is providing two ways to handle the error:
Way 1 - Inherit from DriveKitBackupAgent
DriveKitBackupAgent
The easiest way is to make your BackupAgent
class inherits our DriveKitBackupAgent
class.
Way 2 - Call DriveKit backup methods
If you cannot inherit from DriveKitBackupAgent
class, e.g. when you already inherits from another class, you can still:
Add
tools:replace="android:backupAgent
in your Manifest as suggested in the error message.Call
DriveKitBackupAgent.onCreate(BackupAgentHelper)
in your overridenonCreate()
methodCall
DriveKitBackupAgent.onRestoreFinished(BackupAgentHelper)
in your overridenonRestoreFinished()
method
Last updated