question

lucdowell avatar image
lucdowell asked ·

Installation failed due to '-26'

Hey guys, I recently had issues with getaccount only returning NULL.

The answer I found on another page was:

Basically since you target API level 25 you are expected to ask for the GET_ACCOUNTS permission at runtime. This is kind of explained at https://docs.clover.com/clover-platform/docs/setting-up-an-android-emulator but it's not totally clear.


I recommend targeting an even older API level such as 22 or less otherwise you will need to write a bunch of code to prompt the user for permission just to get it working on the emulator. On real Clover devices we auto-grant the permissions that would otherwise require runtime granting so you only have to do this on the emulator if you target 23 or higher.


I tried changing my target API level to 22, but I'm having app installation issues now onto my emulator.

Installation did not succeed.
The application could not be installed.
Installation failed due to: '-26'

I'm running the app on a station 2018 emulator (API 25). I'm guessing that it's because the target SDK is now 22 vs. the emulator's 25. Does anyone have any solutions? Should I change my emulator's API to 22?


EmulatorAuth
2 comments
10 |2000 characters needed characters left characters exceeded

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

Hmm that's an unusual error I've never seen before. Apps with lower target levels than the device should run fine so there is no need to change the emulator API level. Can you provide some more information: can you obtain logcat from the emulator at the time you attempt to install the app? Can you also run the command "adb --version" on your PC and send us the output.

0 Likes 0 · ·
lucdowell avatar image lucdowell Jacob Abrams ♦♦ ·

Hey Jacob, I'm not sure how to logcat the emulator at the time of installation, but I did notice something. I'm not sure if this was the error causing it, but I only got this installation error when clicking the run button in the top toolbar in android studio when the app was already installed. It doesn't give me this error anymore when adb uninstalling and installing the app. It also doesn't give me this error when adb uninstalling and pressing the run button.

0 Likes 0 · ·

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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

Welcome to the
Clover Developer Community