Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 85a6cd3

Browse files
committedMar 28, 2023
Raise Android API version from 21 to 26
1 parent 33bb475 commit 85a6cd3

File tree

10 files changed

+23
-23
lines changed

10 files changed

+23
-23
lines changed
 

‎build/config/android/config.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ declare_args() {
2020
android_ndk_root = ""
2121

2222
# Version of the Android SDK.
23-
android_sdk_version = 21
23+
android_sdk_version = 26
2424
}

‎examples/tv-app/android/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ android_library("java") {
151151
javac_flags = [ "-Xlint:deprecation" ]
152152

153153
# TODO: add classpath support (we likely need to add something like
154-
# ..../platforms/android-21/android.jar to access BLE items)
154+
# ..../platforms/android-26/android.jar to access BLE items)
155155
}
156156

157157
java_prebuilt("android") {
158-
jar_path = "${android_sdk_root}/platforms/android-21/android.jar"
158+
jar_path = "${android_sdk_root}/platforms/android-26/android.jar"
159159
}
160160

161161
group("default") {

‎examples/tv-casting-app/android/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ android_library("java") {
8686
javac_flags = [ "-Xlint:deprecation" ]
8787

8888
# TODO: add classpath support (we likely need to add something like
89-
# ..../platforms/android-21/android.jar to access BLE items)
89+
# ..../platforms/android-26/android.jar to access BLE items)
9090
}
9191

9292
java_prebuilt("android") {
93-
jar_path = "${android_sdk_root}/platforms/android-21/android.jar"
93+
jar_path = "${android_sdk_root}/platforms/android-26/android.jar"
9494
}
9595

9696
group("default") {

‎gn_build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ else
126126
echo
127127
echo "Hint: Set \$ANDROID_HOME and \$ANDROID_NDK_HOME to enable building for Android"
128128
echo " The required android sdk platform version is 21. It can be obtained from"
129-
echo " https://dl.google.com/android/repository/android-21_r02.zip"
129+
echo " https://dl.google.com/android/repository/platform-26_r02.zip"
130130
fi
131131

132132
echo

‎integrations/docker/images/chip-build-android/Dockerfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ RUN set -x \
1515

1616
# Download and install android SDK
1717
RUN set -x \
18-
&& wget -O /tmp/android-21.zip https://dl.google.com/android/repository/android-21_r02.zip \
18+
&& wget -O /tmp/android-26.zip https://dl.google.com/android/repository/platform-26_r02.zip \
1919
&& mkdir -p /opt/android/sdk/platforms \
2020
&& cd /opt/android/sdk/platforms \
21-
&& unzip /tmp/android-21.zip \
22-
&& mv android-5.0.1 android-21 \
23-
&& rm -f /tmp/android-21.zip \
21+
&& unzip /tmp/android-26.zip \
22+
&& mv android-5.0.1 android-26 \
23+
&& rm -f /tmp/android-26.zip \
2424
&& chmod -R a+rX /opt/android/sdk \
25-
&& test -d /opt/android/sdk/platforms/android-21 \
25+
&& test -d /opt/android/sdk/platforms/android-26 \
2626
&& : # last line
2727

2828
# Download and install android command line tool (for installing `sdkmanager`)
@@ -57,9 +57,9 @@ RUN set -x \
5757
&& export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH \
5858
&& cd /tmp && wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz \
5959
&& mkdir -p $OPENSSL_ARMV7 && cd $OPENSSL_ARMV7 && tar xfz /tmp/openssl-1.1.1g.tar.gz \
60-
&& cd $OPENSSL_ARMV7/openssl-1.1.1g && CC=clang ANDROID_API=21 ./Configure android-arm -D__ANDROID_API__=21 && make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \
60+
&& cd $OPENSSL_ARMV7/openssl-1.1.1g && CC=clang ANDROID_API=26 ./Configure android-arm -D__ANDROID_API__=26 && make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \
6161
&& mkdir -p $OPENSSL_X86 && cd $OPENSSL_X86 && tar xfz /tmp/openssl-1.1.1g.tar.gz \
62-
&& cd $OPENSSL_X86/openssl-1.1.1g && CC=clang ANDROID_API=21 ./Configure android-x86 -D__ANDROID_API__=21 && make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \
62+
&& cd $OPENSSL_X86/openssl-1.1.1g && CC=clang ANDROID_API=26 ./Configure android-x86 -D__ANDROID_API__=26 && make SHLIB_VERSION_NUMBER= SHLIB_EXT=.so \
6363
&& rm -rf /tmp/OpenSSL_1_1_1g.zip \
6464
&& : # last line
6565

‎src/app/server/java/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ android_library("java") {
7070
javac_flags = [ "-Xlint:deprecation" ]
7171

7272
# TODO: add classpath support (we likely need to add something like
73-
# ..../platforms/android-21/android.jar to access BLE items)
73+
# ..../platforms/android-26/android.jar to access BLE items)
7474
}
7575

7676
java_prebuilt("android") {
77-
jar_path = "${android_sdk_root}/platforms/android-21/android.jar"
77+
jar_path = "${android_sdk_root}/platforms/android-26/android.jar"
7878
}

‎src/controller/java/BUILD.gn

+4-4
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ android_library("java") {
286286
]
287287

288288
# TODO: add classpath support (we likely need to add something like
289-
# ..../platforms/android-21/android.jar to access BLE items)
289+
# ..../platforms/android-26/android.jar to access BLE items)
290290
}
291291

292292
if (chip_link_tests) {
@@ -318,7 +318,7 @@ if (chip_link_tests) {
318318
javac_flags = [ "-Xlint:deprecation" ]
319319

320320
# TODO: add classpath support (we likely need to add something like
321-
# ..../platforms/android-21/android.jar to access BLE items)
321+
# ..../platforms/android-26/android.jar to access BLE items)
322322
}
323323

324324
android_library("tests") {
@@ -353,12 +353,12 @@ if (chip_link_tests) {
353353
javac_flags = [ "-Xlint:deprecation" ]
354354

355355
# TODO: add classpath support (we likely need to add something like
356-
# ..../platforms/android-21/android.jar to access BLE items)
356+
# ..../platforms/android-26/android.jar to access BLE items)
357357
}
358358
}
359359

360360
if (!build_java_matter_controller) {
361361
java_prebuilt("android") {
362-
jar_path = "${android_sdk_root}/platforms/android-21/android.jar"
362+
jar_path = "${android_sdk_root}/platforms/android-26/android.jar"
363363
}
364364
}

‎src/messaging/tests/java/BUILD.gn

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ android_library("java") {
7070
javac_flags = [ "-Xlint:deprecation" ]
7171

7272
# TODO: add classpath support (we likely need to add something like
73-
# ..../platforms/android-21/android.jar to access BLE items)
73+
# ..../platforms/android-26/android.jar to access BLE items)
7474
}
7575

7676
if (!build_java_matter_controller) {
7777
java_prebuilt("android") {
78-
jar_path = "${android_sdk_root}/platforms/android-21/android.jar"
78+
jar_path = "${android_sdk_root}/platforms/android-26/android.jar"
7979
}
8080
}

‎src/platform/android/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,5 @@ android_library("java") {
105105
}
106106

107107
java_prebuilt("android_sdk") {
108-
jar_path = "${android_sdk_root}/platforms/android-21/android.jar"
108+
jar_path = "${android_sdk_root}/platforms/android-26/android.jar"
109109
}

‎src/setup_payload/java/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ android_library("java") {
6060
]
6161

6262
# TODO: add classpath support (we likely need to add something like
63-
# ..../platforms/android-21/android.jar to access BLE items)
63+
# ..../platforms/android-26/android.jar to access BLE items)
6464
}

0 commit comments

Comments
 (0)
Please sign in to comment.