@@ -33,7 +33,7 @@ To follow along with this guide, you'll need:
33
33
Ubuntu 18.04 or Ubuntu 16.04. Before attempting to build for Android,
34
34
please make sure you are able to build for Linux by following the
35
35
instructions in the Swift project README.
36
- 2 . The latest version of the Android NDK (r23b at the time of this writing),
36
+ 3 . The latest version of the Android LTS NDK (r25b at the time of this writing),
37
37
available to download here:
38
38
https://developer.android.com/ndk/downloads/index.html .
39
39
3 . An Android device with remote debugging enabled or the emulator. We require
@@ -49,7 +49,7 @@ Enter your Swift directory, then run the build script, passing the path to the
49
49
Android NDK:
50
50
51
51
```
52
- $ NDK_PATH=path/to/android-ndk-r23b
52
+ $ NDK_PATH=path/to/android-ndk-r25b
53
53
$ utils/build-script \
54
54
-R \ # Build in ReleaseAssert mode.
55
55
--android \ # Build for Android.
@@ -70,7 +70,7 @@ Then use the built Swift compiler from the previous step to compile a Swift
70
70
source file, targeting Android:
71
71
72
72
```
73
- $ NDK_PATH="path/to/android-ndk-r23b "
73
+ $ NDK_PATH="path/to/android-ndk-r25b "
74
74
$ build/Ninja-ReleaseAssert/swift-linux-x86_64/bin/swiftc \ # The Swift compiler built in the previous step
75
75
# The location of the tools used to build Android binaries
76
76
-tools-directory ${NDK_PATH}/toolchains/llvm/prebuilt/linux-x86_64/bin/ \
@@ -116,7 +116,7 @@ $ adb push build/Ninja-ReleaseAssert/swift-linux-x86_64/lib/swift/android/libswi
116
116
In addition, you'll also need to copy the Android NDK's libc++:
117
117
118
118
```
119
- $ adb push /path/to/android-ndk-r23b/sources/cxx-stl/ llvm-libc++/libs/armeabi-v7a /libc++_shared.so /data/local/tmp
119
+ $ adb push /path/to/android-ndk-r25b/toolchains/ llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi /libc++_shared.so /data/local/tmp
120
120
```
121
121
122
122
Finally, you'll need to copy the ` hello ` executable you built in the
@@ -159,7 +159,7 @@ $ utils/build-script \
159
159
-R \ # Build in ReleaseAssert mode.
160
160
-T \ # Run all tests, including on the Android device (add --host-test to only run Android tests on the linux host).
161
161
--android \ # Build for Android.
162
- --android-ndk ~/android-ndk-r23b \ # Path to an Android NDK.
162
+ --android-ndk ~/android-ndk-r25b \ # Path to an Android NDK.
163
163
--android-arch armv7 \ # Optionally specify Android architecture, alternately aarch64
164
164
--android-api-level 21
165
165
```
0 commit comments