-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(cli): add build command for android #5891
Conversation
@IT-MikeS Example json file
And command will be just like this ionic capacitor build android --release (default build.json in the proyect) Also the same file could be valid for all platforms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the android config build options, works well.
Tested APK, AAB, signed and unsigned. Works fine. Good job @IT-MikeS it will help a lot to create easier IC. |
I tried on my side ios build with no issue but android i cannot build: |
@riderx only time I've seen that is if your java version your machines default terminal has access to is an incompatible version with the requirements of Gradle or another lib you have in the app requires a different java version. |
@IT-MikeS thanks for this, i have check and seems good to me:
|
I had seted
|
my issue was my java version it was too early version and different from android studio |
Hello, were you able to solve this problem? I have the same problem |
This PR adds the
build
command to the Capacitor CLI which will build the native project then create either a signed AAB or APK.This command requires you to set up a Keystore prior to use. This is done via: opening Android Studio and choose Build -> Generate Signed Bundle / APK
After which you can use the command similar to the below example.
Example Usage:
npx cap build android --keystorepath /path/to/my/keystore --keystorepass KEYSTORE_PASS --keystorealias KEY_ALIAS --keystorealiaspass KEY_PASS --androidreleasetype AAB
Example TS Config File Usage (with environment vars):