Skip to content

Commit

Permalink
测试
Browse files Browse the repository at this point in the history
  • Loading branch information
alx696 committed Aug 16, 2021
1 parent 135744f commit 2e9b340
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ mkdir -p build
#GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -o "build/${NAME}-windows"

echo "Android"
if [ -z "$ANDROID_NDK_HOME" ]; then
echo "没有安装NDK"
wget https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip
unzip android-ndk-r21e-linux-x86_64.zip
export ANDROID_NDK_HOME="$(pwd)/android-ndk-r21e"
echo "NDK路径: ${ANDROID_NDK_HOME}"
if [ -z "$(which gomobile)" ]; then
echo "没有安装gomobile"
go get golang.org/x/mobile/cmd/gomobile
gomobile init
else
echo "已经安装NDK"
echo "已经安装gomobile"
fi
echo "NDK路径: ${ANDROID_NDK_HOME} 开始编译aar"
gomobile bind -target=android/arm64,android/arm -o "build/${NAME}.aar" ./kc ./qc
rm "build/${NAME}-sources.jar"

0 comments on commit 2e9b340

Please sign in to comment.