Display and control your Android device
Upgrade Gradle and use Android SDK 36
Romain Vimonteee3f24739df
diff --git a/build.gradle b/build.gradleindex 81c91d37..8c671e6f 100644--- a/build.gradle+++ b/build.gradle@@ -7,7 +7,7 @@ buildscript {mavenCentral()}dependencies {- classpath 'com.android.tools.build:gradle:8.7.1'+ classpath 'com.android.tools.build:gradle:8.13.0'// NOTE: Do not place your application dependencies here; they belong// in the individual module build.gradle filesdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.propertiesindex b34b7096..fbd6c374 100644--- a/gradle/wrapper/gradle-wrapper.properties+++ b/gradle/wrapper/gradle-wrapper.properties@@ -1,7 +1,7 @@distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/dists-distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip# https://gradle.org/release-checksums/-distributionSha256Sum=d725d707bfabd4dfdc958c624003b3c80accc03f7037b5122c4b1d0ef15cecab+distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531zipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/distsdiff --git a/server/build.gradle b/server/build.gradleindex dbe889e0..3dfc7144 100644--- a/server/build.gradle+++ b/server/build.gradle@@ -1,15 +1,15 @@apply plugin: 'com.android.application'android {- namespace 'com.genymobile.scrcpy'- compileSdk 35+ namespace = 'com.genymobile.scrcpy'+ compileSdk 36defaultConfig {- applicationId "com.genymobile.scrcpy"+ applicationId = "com.genymobile.scrcpy"minSdkVersion 21- targetSdkVersion 35+ targetSdkVersion 36versionCode 30303versionName "3.3.3"- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"+ testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"}buildTypes {release {@@ -18,8 +18,11 @@ android {}}buildFeatures {- buildConfig true- aidl true+ buildConfig = true+ aidl = true+ }+ lint {+ disable 'UseRequiresApi'}}diff --git a/server/build_without_gradle.sh b/server/build_without_gradle.shindex edc4f793..8c572f62 100755--- a/server/build_without_gradle.sh+++ b/server/build_without_gradle.sh@@ -14,8 +14,8 @@ set -eSCRCPY_DEBUG=falseSCRCPY_VERSION_NAME=3.3.3-PLATFORM=${ANDROID_PLATFORM:-35}-BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-35.0.0}+PLATFORM=${ANDROID_PLATFORM:-36}+BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-36.0.0}PLATFORM_TOOLS="$ANDROID_HOME/platforms/android-$PLATFORM"BUILD_TOOLS_DIR="$ANDROID_HOME/build-tools/$BUILD_TOOLS"diff --git a/server/src/main/java/com/genymobile/scrcpy/Server.java b/server/src/main/java/com/genymobile/scrcpy/Server.javaindex a08c948c..a675f1e7 100644--- a/server/src/main/java/com/genymobile/scrcpy/Server.java+++ b/server/src/main/java/com/genymobile/scrcpy/Server.java@@ -226,7 +226,11 @@ public final class Server {private static void internalMain(String... args) throws Exception {Thread.setDefaultUncaughtExceptionHandler((t, e) -> {+ Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler();Ln.e("Exception on thread " + t, e);+ if (defaultHandler != null) {+ defaultHandler.uncaughtException(t, e);+ }});prepareMainLooper();