

This is my blog on the development of
iPhone & Android in ChromeOS, Mac, Windows & Linux.
~/android-sdk-mac_x86 and ~/android-ndk-r5c
export PATH=${PATH}:~/android-sdk-mac_x86/tools:~/android-ndk-r5c
cd ~/android-ndk-r5c/samples/hello-jni
ndk-build
android list target
android update project -t 1 -p .
android list avd
emulator -avd AVD4G -scale 0.5 &
#if you have Samsung Galaxy skin (download here)
emulator -avd AVD4G -skin GALAXY_Tab -scale 0.5 &
ant debug
ant debug install
# location of the keystore. This is used by ant release
key.store= /my-path-to-mykey/my.keystore
key.alias=mykeystore
keytool -genkey -v -keystore /my-path-to-mykey/my.keystore -alias mykeystore -keyalg RSA -keysize 2048 -validity 10000
ant release
cd ~/android-ndk-r5c/samples/test-libstdc++
#include <iostream>
using namespace std;
int main() {
cout << "hello, world\n";
return 0;
}
APP_STL := stlport_static
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := test-libstl
LOCAL_SRC_FILES := test-libstl.cpp
LOCAL_LDLIBS := -llog
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_EXECUTABLE := test-libstl
run:
~/android-sdk-mac_x86/platform-tools/adb push libs/armeabi/$(LOCAL_MODULE) /data/local/bin/$(LOCAL_MODULE)
~/android-sdk-mac_x86/platform-tools/adb shell chmod 755 /data/local/bin/$(LOCAL_MODULE)
~/android-sdk-mac_x86/platform-tools/adb shell /data/local/bin/$(LOCAL_MODULE)
# makefile requires the use of tab for the indented spaces above
cd ~/android-ndk-r5c/samples/test-libstdc++
ndk-build clean && ndk-build
ndk-build run