support sdk20-18 (android4.4-4.3, kitkat and partly jelly bean)

This commit is contained in:
B. Petersen
2019-11-14 20:52:36 +01:00
parent ce2b7287d9
commit 546a5dfbb3
3 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ android {
applicationId "com.b44t.messenger"
multiDexEnabled true
minSdkVersion 21 // when changing minSdkVersion here, also adapt AndroidManifest.xml!
minSdkVersion 18
targetSdkVersion 28
vectorDrawables.useSupportLibrary = true
+1 -1
View File
@@ -1,4 +1,4 @@
APP_PLATFORM := android-21
APP_PLATFORM := android-18
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
APP_STL := c++_static
+8 -6
View File
@@ -11,31 +11,33 @@ cd jni/deltachat-core-rust
# and add the correct clang-linkers to `~/.cargo/config`:
# ```
# [target.armv7-linux-androideabi]
# linker = "PATH_TO_NDK/toolchains/llvm/prebuilt/HOST/bin/armv7a-linux-androideabi21-clang"
# linker = "PATH_TO_NDK/toolchains/llvm/prebuilt/HOST/bin/armv7a-linux-androideabi18-clang"
# [target.aarch64-linux-android]
# linker = "PATH_TO_NDK/toolchains/llvm/prebuilt/HOST/bin/aarch64-linux-android21-clang"
# [target.i686-linux-android]
# linker = "PATH_TO_NDK/toolchains/llvm/prebuilt/HOST/bin/i686-linux-android21-clang"
# linker = "PATH_TO_NDK/toolchains/llvm/prebuilt/HOST/bin/i686-linux-android18-clang"
# [target.x86_64-linux-android]
# linker = "PATH_TO_NDK/toolchains/llvm/prebuilt/HOST/bin/x86_64-linux-android21-clang"
# ```
# then, the following should work:
export CFLAGS=-D__ANDROID_API__=21
echo "-- cross compiling to armv7-linux-androideabi (arm) --"
TARGET_CC=armv7a-linux-androideabi21-clang \
export CFLAGS=-D__ANDROID_API__=18
TARGET_CC=armv7a-linux-androideabi18-clang \
cargo build --release --target armv7-linux-androideabi -p deltachat_ffi
echo "-- cross compiling to aarch64-linux-android (arm64) --"
export CFLAGS=-D__ANDROID_API__=21
TARGET_CC=aarch64-linux-android21-clang \
cargo build --release --target aarch64-linux-android -p deltachat_ffi
echo "-- cross compiling to i686-linux-android (x86) --"
TARGET_CC=i686-linux-android21-clang \
export CFLAGS=-D__ANDROID_API__=18
TARGET_CC=i686-linux-android18-clang \
cargo build --release --target i686-linux-android -p deltachat_ffi
echo "-- cross compiling to x86_64-linux-android (x86_64) --"
export CFLAGS=-D__ANDROID_API__=21
TARGET_CC=x86_64-linux-android21-clang \
cargo build --release --target x86_64-linux-android -p deltachat_ffi