question

aadel avatar image
aadel asked Dan commented

Retrieving Device Account on Clover Mini 2nd Gen

Hi,

Running the code snippet below on Clover Mini 2nd Gen emulator connected to the sandbox:

mAccount = CloverAccount.getAccount(this);
the returned value is null

Environemnt: Sandbox
SDK version: 28 and 26

Note: building against SDK version 25 generates errors related to missing resources:

.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/77f53e7e5532d91f058879b164ac9a0d/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/77f53e7e5532d91f058879b164ac9a0d/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
Attached build.gradle file

Any thoughts?

Thanks,
A.
SandboxEmulator
buildgradle.zip (2.6 KiB)
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Can you show us your build.gradle(app) file ?

0 Likes 0 ·

1 Answer

Bryanne Vega avatar image
Bryanne Vega answered Dan commented
In second Gen devices, Android Oreo requires a different method on obtaining accounts and it's not through the Manifest's permissions.

Lower your SDK to 25 (I believe 27 is the maximum you can go with) and retry.
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Your targetSdkVersion must be 25 at a maximum. Your other issues look like Android Studio ones, have you tried invalidating caches and restarting AS?
0 Likes 0 ·

Hi Dan - thanks for your reply. Yes, we tried invalidating caches and restarting AS but got the same issue. We also tried removing .gradle/cache directory. We use gradlew to build the release though not the build module inside AS.

0 Likes 0 ·

Welcome to the
Clover Developer Community