Difference between revisions of "Build Android Apps using LDC in a Container"

From D Wiki
Jump to: navigation, search
(Created page with "Using Docker it is easy to create Android Applications. Although this page shows you how to create Android Apps on a Windows system, it also works for Linux and Mac operation...")
 
Line 1: Line 1:
 +
Work in progress
 +
 
Using Docker it is easy to create Android Applications. Although this page shows you how to create Android Apps on a Windows system, it also works for Linux and Mac operation systems.
 
Using Docker it is easy to create Android Applications. Although this page shows you how to create Android Apps on a Windows system, it also works for Linux and Mac operation systems.
  
Line 21: Line 23:
 
3. Compile the demo
 
3. Compile the demo
 
Within the container shell execute following commands:
 
Within the container shell execute following commands:
 +
 +
cd /projects/android/samples/native-activity/
 +
ldc2 -I../../ -c jni/main.d
 +
ldc2 -I../../ -c ../../android/sensor.d
 +
ldc2 -I../../ -c ../../android_native_app_glue.d
 +
mkdir -p libs/armeabi-v7a/

Revision as of 17:49, 16 January 2017

Work in progress

Using Docker it is easy to create Android Applications. Although this page shows you how to create Android Apps on a Windows system, it also works for Linux and Mac operation systems.

You need to have following software installed on your host operation system: - Docker (Docker for Windows) - Java Development Kit (JDK) - [Android SDK/https://developer.android.com/studio/index.html] - [Ant/ant.apache.org]

1. Clone Android Headers / Demos Clone the repository https://github.com/joakim-noah/android into folder c:\D\projects.


2. Start docker

This command will pull the image andre2007/ldc-android from the docker hub and start a shell within the container. Also the path c:\D\projects will be mounted in as \projects.

docker run --rm -it -v c:/D/projects:/projects andre2007/ldc-android sh


3. Compile the demo Within the container shell execute following commands:

cd /projects/android/samples/native-activity/ ldc2 -I../../ -c jni/main.d ldc2 -I../../ -c ../../android/sensor.d ldc2 -I../../ -c ../../android_native_app_glue.d mkdir -p libs/armeabi-v7a/