Android: How to build .APK from terminal?

I am developing a dynamic application generator, so I will need to run a command based on the runtime using Java on the server

+4
source share
3 answers

From the Android developer site:

Project management from the command line

Creating an APK from the command line

You will need Gradle to build from the command line. After that, you can create the APK as follows:

Window:

> gradlew.bat assembleRelease 

Unix:

 $ ./gradlew assembleRelease 

This creates the .apk file of the Android application as part of the bin / directory project, named -unsigned.apk.

+7
source

If you can rely on the Android SDK, it's as simple as generating a build.xml file and some properties and calling ant.

You can create an android project using the android command for reference.

+1
source

ant release team creates release APK

+1
source

Source: https://habr.com/ru/post/1386075/


All Articles