1

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
unlimit
  • 21
  • 7
  • Which error you got in your command line? – Fearcoder Oct 09 '22 at 16:23
  • I did not get any error but the .abb file was not created neither was the folder bundle. – unlimit Oct 10 '22 at 05:59
  • I am not familiar with ionic V2, but do you have an android map? You can open this with android studio and generate the .abb file there. – Fearcoder Oct 10 '22 at 15:30
  • Can you share the logs you get after running the first command? It usually works with just the first command – Rajesh Kumar Oct 11 '22 at 12:15
  • @Fearcoder I have Android Studio Installed. But, the thing is I have done many fixes & work around to generate the build (apk). If I choose to build in Android Studio then I have to go through these stuff again I guess. Thanks for suggestion – unlimit Oct 12 '22 at 07:03
  • @RajeshKumar last logs line : BUILD SUCCESSFUL in 42s 43 actionable tasks: 1 executed, 42 up-to-date Built the following apk(s): H:/workspace/RetailMapp/profitguru_dev/profitGuruMAPP/platforms/android/build/outputs/apk/release/android-release-unsigned.apk – unlimit Oct 12 '22 at 07:23

1 Answers1

0
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\
Ikenitenine
  • 63
  • 2
  • 2
  • 17