You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
8 months ago | |
---|---|---|
app | 8 months ago | |
go | 8 months ago | |
gradle/wrapper | 8 months ago | |
.gitignore | 12 months ago | |
README.md | 8 months ago | |
build.gradle | 8 months ago | |
go.mod | 8 months ago | |
go.sum | 8 months ago | |
gradle.properties | 9 months ago | |
gradlew | 9 months ago | |
gradlew.bat | 9 months ago | |
settings.gradle | 9 months ago |
README.md
Before
At least Go 1.16 is required. For detailed instructions, see gomobile wiki
Install
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
Build aar
mkdir -pv ./app/libs/
gomobile clean
go get -u golang.org/x/mobile/cmd/gomobile
gomobile bind -v --target=TARGET --ldflags '-w -s' -o ./app/libs/fdroid.aar --androidapi=23 ./go/ffcore
where TARGET
can be:
android
- supportarm
,arm64
,386
andamd64
architecturesandroid/arm64
- support onlyARM64
architecture. Recommended for modern physical devicesandroid/arm
- support onlyARMv7
architecture. Recommended for old physical devicesandroid/386
orandroid/amd64
for emulators or some rare deviceandroid/386,android/amd64
for emulators or some rare device. Both libs architectures will be added in arr file
Troubleshooting
If command not found: gomobile
: export PATH=$PATH:~/go/bin/