GoDroid

General

Category
Free
Tag
Toolkits For Other PL
License
N/A
Min SDK
9 (Android 2.3–2.3.2 Gingerbread)
Registered
Nov 2, 2014
Favorites
0
Link
https://github.com/MarinX/godroid
See also
Kotlin
Kandy
Ruboto
Neko
python-for-android

Additional

Language
Java
Version
N/A
Created
Oct 31, 2014
Updated
Jul 15, 2017 (Retired)
Owner
Marin Basic (MarinX)
Contributors
Marin Basic (MarinX)
Matthias Koch (fmt-Println-MKO)
2
Activity
Badge
Generate
Download
Source code

Advertisement

godroid

Golang 1.4 beta on Android

currently only working on linux (use a vm if are on macos)

Thanks for support:

Discounted! As from official go 1.4, use native functions.

QUICK TUTORIAL

  1. Download and install NDK -> From go.mobile:

Pick a home for the standalone NDK toolchain and set an environment variable: NDK_ROOT=$HOME/android/ndk-toolchain

Configure the NDK toolchain:

ndk/build/tools/make-standalone-toolchain.sh --platform=android-9 --install-dir=$NDK_ROOT
  1. Get the Golang 1.4 beta, go to into src dir and type:

     CC_FOR_TARGET=$NDK_CC GOOS=android GOARCH=arm GOARM=7 ./make.bash
    
  2. At some point, you should see gcc erros about 'gcc: error: unrecognized command line option -marm'

  3. Go get: go get github.com/MarinX/godroid

  4. Folder android_so_lib, contains makefile to build your .so lib (I already included this is AndroidStudio project, so you can check it and run)

  5. You can import the android_studio project and explore/modify/run (support for android 2.3>=).

  6. When you are done, don't forget to uncomment or remove the PATH you set, to use your standard gcc.

Discounted! As from official go 1.4, use native functions.