@abeluck's build notes for ipfs-shipyard/gomobile-ipfs
Install golang. I used 1.18 from the fedora repos.
You'll need python3 with pip available.
In SDK Manager
- Use SDK Platform
Android 11.0 (R)
- in SDK Tools use
NDK (Side by side)
version23.1.7779620
My virutal device is a Pixel 4 API 30 running Android 11
You'll need the following to build the local go lib
Env file
export ANDROID_HOME="$HOME/Android/Sdk"
export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/23.1.7779620"
export GOPATH="$HOME/go"
export JAVA_HOME="$HOME/vendor/android-studio/jre"
export PATH="$PATH:$ANDROID_HOME/emulator"
export PATH="$PATH:$ANDROID_HOME/platform-tools"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:$JAVA_HOME/bin"
Build the go library
cd gomobile-ipfs/packages
make build_core.android
# note: this takes quite a while in a fresh go env
Generate the bridge AAR
cd gomobile-ipfs/android/bridge
gradle build # (i ran this via Android Studio not the cli)
Open the gomobile-ipfs/android
folder as a new project in Android Studio.
Build it and run the application.
gomobile-ipfs/android/bridge/build/outputs/aar/bridge-debug.aar
gomobile-ipfs/packages/build/android/maven/ipfs/gomobile/core/0.0.42-dev/core-0.0.42-dev.aar