Home Ask Login Register

Developers Planet

Your answer is one click away!

Harshit Gupta February 2016

Build (not develop) your android app .apk (gradle build) on server?

I'm trying to build(not develop) an android application on server. I've the whole native android code on the server, which I need to build according to some modification done on the server.

I've been looking all over the internet but couldn't find any detailed solution. All I got to know was I might need Jenkins or some CI tool (which I think is time consuming as I'll need to get them installed on server and then all the android dependencies).

Initial idea was to build the .apk file via some python script which contains all the gradle commands in it.

How can i do this?


Jari Kokkonen February 2016

You need to install Stand-alone SDK tools and suitable SDK packages to your server to build Android software.

When you have all installed and good, you can build APK with gradle , e.g. (Linux and Mac)

./gradlew assemble 

Christopher Orr February 2016

Android apps can be built easily on a system that doesn't have any Android tools installed by applying the Android SDK Manager plugin for Gradle to your project.

When running ./gradlew assembleDebug (or whatever task), then Gradle will be installed and then all Android dependencies, including the SDK tools, build tools, platform versions and other dependencies will be installed automatically.

You can run this simply on the command line yourself, or automate to run after every commits to source control easily with Jenkins (it's easy to install on a wide range of operating systems).

Post Status

Asked in February 2016
Viewed 3,682 times
Voted 6
Answered 2 times


Leave an answer

Quote of the day: live life