From 7163a2480a84848abf80b3e16ea4277fcfeec696 Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Fri, 26 Jan 2024 23:57:47 +0800 Subject: [PATCH] Bump minimum Android version and Android NDK version. * Minimum Android version is now Android 6. * NDK 26.1.10909125 is now used. --- README.md | 4 ++-- app/build.gradle | 4 ++-- .../main/java/org/love2d/android/IntentReceiverActivity.java | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8d3e1ee2..353ad3b0 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Before you start, install JDK 17 (not later not earlier). If you intend to build Android Studio bundles its own JDK 17. Install CMake version 3.21 or later in your system. Install Android SDK with SDK API 34 (34.x.y) and Android NDK -25.2.9519653, set the environment variable `ANDROID_HOME` to your Android SDK as necessary then run. +26.1.10909125, set the environment variable `ANDROID_HOME` to your Android SDK as necessary then run. ``` $ ./gradlew assembleNormalRecord @@ -64,7 +64,7 @@ generate APK which you can install or `gradlew bundleEmbedNoRecordRelease` (or ` AAB which you can upload to Play Store. Alternatively, you can install Android Studio **2022.3.1** or later. After opening it for the first time, open its SDK Manager -and on the tab "SDK Tools", tick "Show Package Details" then select NDK (Side By Side) version 25.2.9519653. After that, open +and on the tab "SDK Tools", tick "Show Package Details" then select NDK (Side By Side) version 26.1.10909125. After that, open the repository root. Notice: Previously, the embed + APKTool method is preferred, but recent announcements by Google and recent changes in Android render that method obsolete. diff --git a/app/build.gradle b/app/build.gradle index fe574c2e..f8b76da9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,13 +6,13 @@ plugins { android { namespace "org.love2d.android" - ndkVersion "26.0.10792818" + ndkVersion "26.1.10909125" defaultConfig { applicationId project.properties["app.application_id"] versionCode project.properties["app.version_code"].toInteger() versionName project.properties["app.version_name"] - minSdk 21 + minSdk 23 compileSdk 34 targetSdk 34 diff --git a/app/src/main/java/org/love2d/android/IntentReceiverActivity.java b/app/src/main/java/org/love2d/android/IntentReceiverActivity.java index fffc4ef0..9ae52ede 100644 --- a/app/src/main/java/org/love2d/android/IntentReceiverActivity.java +++ b/app/src/main/java/org/love2d/android/IntentReceiverActivity.java @@ -27,6 +27,8 @@ import android.os.Bundle; import androidx.annotation.Nullable; +import java.util.Objects; + public class IntentReceiverActivity extends Activity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { @@ -35,7 +37,7 @@ public class IntentReceiverActivity extends Activity { Intent mainIntent = getIntent(); Intent intent = new Intent(this, GameActivity.class); - if (mainIntent.getAction().equals(Intent.ACTION_SEND)) { + if (Objects.equals(mainIntent.getAction(), Intent.ACTION_SEND)) { // Convert to simpler intent that our GameActivity can process. Uri uri = mainIntent.getParcelableExtra(Intent.EXTRA_STREAM); intent.setData(uri);