fail to install ionic signed app on android 11

Viewed 846

I can install my release version of my app on all of android versions except android 11.

I've followed these instructions to sign my app.

Using this tool warns me that the .apk file is not signed.

I already tried checking not signed version of my app, and it works just fine in android 11.

2 Answers

hi guys i had the same issue and after spend many time i could fix it with 6 step.

Fixed ionic 6 application not installed on android 11

Step One: Install or Update some requirements

  1. upgrade to Cordova version 10

    npm uninstall -g cordova

    npm install -g cordova@10.0.0

  2. Upgrade android studio to latest version (android studio arctic fox)

check this link to know about android arctic fox and download it

  1. install android build tools 30.0.2

  2. install android sdk platform level 30

  3. change some config on config.xml file

<preference name="android-targetSdkVersion" value="30" />
<preference name="hostname" value="localhost" />
<preference name="AndroidInsecureFileModeEnabled" value="true" />

and this is my complete answer at ionic forum so you can check it...

I found the solution for it. I couldn't find the v2 signing option in android studio but I used following commands to generate signed apk:

cordova build --prod --release android -- --packageType=apk

~/Library/Android/sdk/build-tools/31.0.0/zipalign -v 4 app-release-unsigned.apk signed.apk

~/Library/Android/sdk/build-tools/31.0.0/apksigner sign --max-sdk-version=30 -ks my-release-key.keystore --ks-key-alias=alias_name signed.apk

Please change the path according to your OS. I am on mac.

If you are unable to install this apk on your device please make sure that no older version of same package is installed on your device.

Or please try to run below command before installing it:

adb uninstall <package name>

Above command will uninstall it cleanly from your device.

It worked for me after this.

Related