Generate .abb file from apk or using cordova

678 Views Asked by At

As playstore requires the application in the .aab format, I want to build the same from my ionic v2 project or convert apk to .abb The following commands did not work for me. I shall provide the details of cordova and ionic, help me with the same

  1. ionic cordova build android --prod --release -- -- --packageType=bundle
  2. ./gradlew bundleRelease
1

There are 1 best solutions below

1
On
cordova build android --release
cd c:\projects_cordova\yourproject\platforms\android
gradlew bundle

Result will be here

c:\projects_cordova\yourproject\platforms\android\app\build\outputs\bundle\debug\

Than sign aab:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore c:\projects_cordova\yourproject\keystore.keystore c:\projects_cordova\yourproject\platforms\android\app\build\outputs\bundle\release\app-release.aab alias

Result will be here

c:\projects_cordova\yourproject\platforms\android\app\build\outputs\bundle\release\