Updating to ReaderSDK 1.7.1 Android

I am attempting to upgrade to ReaderSDK 1.7.1 but I am finding that it is unable to build with my application due to some errors.
I have 2 red exclamation marks on
One or more issues found when checking AAR metadata values.

When I check the merged manifest I see the following errors:

Warning Activity#com.squareup.ui.PaymentActivity was tagged at Android Manifest.xml:179 to remove other declarations but no other declaration present xxxxxxxx.main manifest (this file), line 178

Warning activity#com.squareup.ui.main.MainActivity was tagged at AndroidManifest.xml:182 to remove other declarations but no other declaration present xxxxxxxxxx.main manifest (this file), line 181

The previous ReaderSDK 1.5.1 built with my application with no problems. I don’t believe I have changed my application other than to upgrade the gradle build files.

I am using the latest Android Studio Dolphin 2021.3.1 Patch 1

I have followed the Square guidelines

build gradle project
dependencies {
classpath ‘com.android.tools.build:gradle:7.0.4’

build gradle app

target Sdk Version 31
minSdkVersion 24

android {
compileSdkVersion 31
buildToolsVersion “30.0.3”

packagingOptions {
doNotStrip “//libregister.so”


Any help to resolve these errors would be appreciated.

When you updated did you either upgrade the targetSdk to 31, or suppress the new permissions in AndroidManifest.xml. If you do neither, and build at targetSdk=30 or less but with the new permissions because in RSDK 1.7.1, you will get compile-time errors referencing BLUETOOTH_SCAN and/or BLUETOOTH_CONNECT. :slightly_smiling_face:

Yes. I was aware of this. As I mentioned I set the build grade file to TargetSDK version 31 and CompileSDK to version 31. And the errors I received do not seem to relate to Bluetooth.

Hi Brian,

Any help to resolve these errors would be appreciated.

So I finally managed to get the latest ReaderSDK 1.7.1 version to build with my application. Of course everyone’s application is different. But I found it is best not to allow Android Studio to update all your dependencies. if you already have a working version better to upgrade dependencies only if necessary.

I was getting an error message that merge:DebugNativeLibs was failing and that there were more than one version of a number of libraries. So I managed to resolve these errors by adding the following to the android build.gradle file.
packagingOptions {
doNotStrip “//libregister.so”
pickFirst ‘lib/arm64-v8a/libbugsnag-root-detection.so’
pickFirst ‘lib/armeabi-v7a/libbugsnag-root-detection.so’
pickFirst ‘lib/x86/libbugsnag-root-detection.so’
pickFirst ‘lib/x86_64/libbugsnag-root-detection.so’

Glad to hear you figured it out. :slightly_smiling_face: