How to compile APK from command line?

后端 未结 3 1711
盖世英雄少女心
盖世英雄少女心 2020-12-05 00:53

I am interested in making Android apps on demand. Depending on the clients request, my web site would send me a JSON file direct to a Windows application that I have created

3条回答
  •  渐次进展
    2020-12-05 01:33

    Android doesn't directly use ANT build systems now. It uses Gradle, which is based on Groovy. You can learn more about build systems here.

    You can see the list of available tasks you can run on using this command

    gradlew tasks
    

    To initiate a debug build, invoke the assembleDebug task

    gradlew assembleDebug
    

    You can install your app using the adb tool via this command

    adb install path/to/your_app.apk
    

    To learn more about building on command line, follow this comprehensive article.

    Also you can read this article on "Why Build Your Java Projects with Gradle Rather than Ant or Maven?"

提交回复
热议问题