Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 76f00d2

Browse files
committed
[[ Android SDK ]] Update to compile against android API 26
1 parent 4eff4ef commit 76f00d2

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
BUILDBOT_PLATFORM_TRIPLES = (
2626
'x86-linux-debian8',
2727
'x86_64-linux-debian8',
28-
'armv6-android-api9',
28+
'armv6-android-api26',
2929
'universal-mac-macosx10.9', # Minimum deployment target
3030
'universal-ios-iphoneos11.4',
3131
'universal-ios-iphoneos11.2',
@@ -412,11 +412,11 @@ def guess_android_build_tools(sdkdir):
412412

413413
def validate_android_tools(opts):
414414
if opts['ANDROID_NDK_VERSION'] is None:
415-
opts['ANDROID_NDK_VERSION'] = 'r14'
415+
opts['ANDROID_NDK_VERSION'] = 'r17'
416416

417417
ndk_ver = opts['ANDROID_NDK_VERSION']
418418
if opts['ANDROID_PLATFORM'] is None:
419-
opts['ANDROID_PLATFORM'] = 'android-17'
419+
opts['ANDROID_PLATFORM'] = 'android-26'
420420

421421
if opts['ANDROID_NDK'] is None:
422422
ndk = guess_android_tooldir('android-ndk')

docs/development/build-android.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Extract both the NDK and SDK to a suitable directory, e.g. `~/android/toolchain`
2222
mkdir -p ~/android/toolchain/android-sdk-linux
2323
cd ~/android/toolchain
2424

25-
wget https://dl.google.com/android/repository/android-ndk-r14-linux-x86_64.zip
25+
wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip
2626
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
2727

28-
unzip android-ndk-r14-linux-x86_64.zip
28+
unzip android-ndk-r17-linux-x86_64.zip
2929

3030
pushd android-sdk-linux
3131
unzip tools_r25.2.3-linux.zip
@@ -41,19 +41,15 @@ Update the SDK:
4141
Create a standalone toolchain (this simplifies setting up the build environment):
4242

4343
````bash
44-
android-ndk-r14/build/tools/make_standalone_toolchain.py \
45-
--arch arm --api 9 \
44+
android-ndk-r17/build/tools/make_standalone_toolchain.py \
45+
--arch arm --api 26 \
4646
--install-dir ${HOME}/android/toolchain/standalone
4747
````
4848

49-
**Note:** We currently use NDK API 9 for building the LiveCode Android engine and
50-
do not specify the '--stl' option as we currently require the C++ library (if used)
51-
to be statically linked into the executable.
52-
5349
Add a couple of symlinks to allow the engine configuration script to find the Android toolchain:
5450

5551
````bash
56-
ln -s android-ndk-r14 android-ndk
52+
ln -s android-ndk-r17 android-ndk
5753
ln -s android-sdk-linux android-sdk
5854
````
5955

@@ -84,11 +80,11 @@ LINK="${BINDIR}/${TRIPLE}-clang ${COMMON_FLAGS} -fuse-ld=bfd"
8480
AR="${BINDIR}/${TRIPLE}-ar"
8581

8682
# Android platform information
87-
ANDROID_NDK_VERSION=r14
88-
ANDROID_PLATFORM=android-17
89-
ANDROID_NDK=${TOOLCHAIN}/android-ndk-r14
83+
ANDROID_NDK_VERSION=r17
84+
ANDROID_PLATFORM=android-26
85+
ANDROID_NDK=${TOOLCHAIN}/android-ndk-r17
9086
ANDROID_SDK=${TOOLCHAIN}/android-sdk-linux
91-
ANDROID_BUILD_TOOLS=25.0.2
87+
ANDROID_BUILD_TOOLS=27.0.3
9288
ANDROID_LIB_PATH=${TOOLCHAIN}/standalone/${TRIPLE}/lib
9389

9490
export JAVA_SDK

ide-support/revdeploylibraryandroid.livecodescript

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function deployIsValidJDK pPath
179179
end deployIsValidJDK
180180

181181
function deployRequiredSDK
182-
return "Android 4.0.3 (API 15)"
182+
return "Android 8.0 (API 26)"
183183
end deployRequiredSDK
184184

185185
function deployIsValidSDK pPath
@@ -190,10 +190,8 @@ function deployIsValidSDK pPath
190190
return false
191191
end if
192192

193-
// We need API 15 in order to be able to give the value 'screenSize' to the manifest variable configChanges
194-
// That was introduced in the API 13, but the SDK manager only have API 15 nowadays
195-
if there is no folder (pPath & slash & "platforms/android-15") then
196-
--return "could not find install of SDK level 8, make sure it has been installed with the Android SDK Manager"
193+
if there is no folder (pPath & slash & "platforms/android-26") then
194+
--return "could not find install of SDK level 26, make sure it has been installed with the Android SDK Manager"
197195
return false
198196
end if
199197

@@ -326,7 +324,7 @@ function pathToRootClasses pRoot
326324
if pRoot is empty then
327325
put sAndroidRoot into pRoot
328326
end if
329-
return pRoot & slash & "platforms/android-15/android.jar"
327+
return pRoot & slash & "platforms/android-26/android.jar"
330328
end pathToRootClasses
331329

332330
function pathToSDKClasses pRoot

prebuilt/scripts/android.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Android options
22
ANDROID_NDK=${ANDROID_NDK:-"${HOME}/android/toolchain/android-ndk"}
3-
ANDROID_PLATFORM=${ANDROID_PLATFORM:-android-17}
3+
ANDROID_PLATFORM=${ANDROID_PLATFORM:-android-26}
44
55
# Has a full, custom toolchain been specified?
66
# AR, CC, CXX, LINK, OBJCOPY, RANLIB, STRIP

0 commit comments

Comments
 (0)