mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-03 20:38:13 +03:00
Android: Update build instructions to use commandline-tools
Now it works with JDK 9+.
This commit is contained in:
+10
-13
@@ -15,24 +15,21 @@ Open this directory as an Android Studio project.
|
||||
### Command line build
|
||||
Configure environment variables and run the `gradlew` script in this folder.
|
||||
|
||||
Example build instructions (for Debian Stretch):
|
||||
Example build instructions (for Debian buster):
|
||||
```sh
|
||||
# Install necessary packages
|
||||
sudo apt install git wget unzip default-jdk-headless ninja-build
|
||||
wget https://github.com/Kitware/CMake/releases/download/v3.13.5/cmake-3.13.5-Linux-x86_64.sh
|
||||
sudo sh cmake-3.13.5-Linux-x86_64.sh --skip-license --prefix=/usr/local
|
||||
sudo apt install git wget unzip default-jdk-headless cmake ninja-build
|
||||
|
||||
# Install Android SDK / NDK
|
||||
export ANDROID_HOME=$HOME/android-sdk
|
||||
export PATH=$PATH:$ANDROID_HOME/tools
|
||||
export PATH=$PATH:$ANDROID_HOME/platform-tools
|
||||
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
|
||||
unzip sdk-tools-linux-4333796.zip -d $ANDROID_HOME
|
||||
yes |$ANDROID_HOME/tools/bin/sdkmanager --licenses
|
||||
$ANDROID_HOME/tools/bin/sdkmanager ndk-bundle
|
||||
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
|
||||
export ANDROID_SDK_ROOT=$HOME/android-sdk
|
||||
mkdir -p $ANDROID_SDK_ROOT/cmdline-tools
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
|
||||
unzip commandlinetools-linux-6609375_latest.zip -d $ANDROID_SDK_ROOT/cmdline-tools
|
||||
yes |$ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager --licenses
|
||||
$ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager ndk-bundle
|
||||
export ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk-bundle
|
||||
|
||||
# Check out and build system3
|
||||
# Check out and build system3-sdl2
|
||||
git clone https://github.com/kichikuou/system3-sdl2.git
|
||||
cd system3-sdl2/android
|
||||
./gradlew build # or ./gradlew installDebug if you have a connected device
|
||||
|
||||
Reference in New Issue
Block a user