简体   繁体   中英

Android development environment in Docker

I want to build android development environment in Docker. I have read https://plus.google.com/+BradFitzpatrick/posts/CmqtqAShWZJ on this link. It is very cool, but I tried step by step to do it and have some problems. The above link has some steps:

Step 1: find https://index.docker.io/u/wasabeef/android/ -- a trusted build of all the goodies.

Step 2: extend it with Camlistore stuff: https://github.com/bradfitz/camlistore/blob/master/clients/android/devenv/Dockerfile

Note that we build an ARM version of Go there, since the Camlistore uploader uses a Go ARM child process, under the main Java app.

Step 3: little Perl script that runs in the container: https://github.com/bradfitz/camlistore/blob/master/clients/android/build-in-docker.pl

Step 4: little Make glue I run from the host: https://github.com/bradfitz/camlistore/blob/master/clients/android/Makefile

I have finished Step 1, but other links don't use a docker command. So I want to know which docker command I can use. Can you give some detailed step such as Step 1? I have little knowledge, so I need a detailed step.

You can also use a registry :

https://registry.hub.docker.com/u/ksoichiro/android/

That is very simple, because you download an image that is ready! Enjoy!

The link you submitted has all the files you need to build the environment described. The second step links to a Dockerfile to build the image used to build Android APKs. The third step links to a perl script, which I supposed is used to build the Android APK (I have not knowledge about Android development, but I think you will have to mod this script if you want to build your own apps). And the fourth links to a bash script which is used to manage all these things (build the Dockerimage, build the apk...).

You can download all of these files one by one, or you can clone all the repository and build from there:

  1. Clone the git repository

    git clone git@github.com:camlistore/camlistore.git

  2. Navigate to the folder

    cd camlistore/clients/android/

  3. Build the Docker image using the make script

    make env

  4. Build the APK using the scripts

    make dockerrelease

It seems to be a good start point, but you will need to change someway the scripts to build the apks you wish.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM