I am developing a dynamic app generator, so I would need to run the command on a runtime basis using Java on a server
From the Android Developer site:
Managing Projects from the Command Line
Building APK from Command Line
You will need Gradle to build from the command line. Once you have that you can create the APK like this:
Windows:
> gradlew.bat assembleRelease
Unix:
$ ./gradlew assembleRelease
This creates your Android application .apk file inside the project bin/ directory, named -unsigned.apk.
If you may rely on Android SDK, it is as simple as to generate build.xml and some properties file and invoke ant.
You may generate an android project by command android for reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With