-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate .apk instead of .aab file (Ionic Project) #1671
Comments
The Cordova CLI uses I can't speak for third-party CLI's like ionic and all information below is assuming pure cordova environment. On windows, if you're using Command Prompt or Powershell, I think the intermediate Also note that I believe the build output will print out all apks/bundles thats in your build output directory. So it will include text stating that it "built" a file even if that file wasn't actually built from your last command, but purely because the file already existed in the build/outputs directories. In otherwords, you should see the APK in The command hasn't changed since it was first introduced in v10 and building both AABs and APKs is part of my workflow so I'm pretty confident it works (On Linux/Mac machines anyway). Let me know if this helps. |
|
Can you try I don't use windows so I kinda forget but I'm pretty sure windows requires that separating |
@breautek that worked, thanks a lot. I see a lot of people are complaining about the same issue on stackoverflow so I will go and answer using your recommendation |
I've created a ticket on the docs repo (apache/cordova-docs#1336) as well, so that we can improve our docs on this caveat. I'm closing this issue because it's not really a bug. |
Thanks for your help |
Bug Report
I am trying to generate a .apk file but whatever command I try I keep getting a .aab file. What is the new command to use in order for one to successfully generate a .apk file?
Problem
I used the following commands to no success:
ionic cordova build android --release --packageType=apk
ionic cordova build android --prod --release -- --packageType=apk
cordova build android --release -- --packageType=apk
cordova build android --prod --release -- -- --packageType=apk
What is expected to happen?
Produce a .apk file
What does actually happen?
All the commands produces a .aab file
Command or Code
ionic cordova build android --release --packageType=apk
ionic cordova build android --prod --release -- --packageType=apk
cordova build android --release -- --packageType=apk
cordova build android --prod --release -- -- --packageType=apk
Version information
Cordova Platforms : android 12.0.1
Cordova CLI : 12.0.0 (cordova-lib@12.0.1)
Ionic CLI : 6.20.8
@angular-devkit/build-angular : 15.2.7
@angular-devkit/schematics : 15.2.7
@angular/cli : 15.2.7
@ionic/angular-toolkit : 9.0.0
native-run : 1.7.2
Android SDK Tools : 26.1.1
NodeJS : v18.16.1
npm : 9.6.0
OS : Windows 10
The text was updated successfully, but these errors were encountered: