From 7a7f7993e74f2fe4bfc2195ad9e443bc1ea38a8f Mon Sep 17 00:00:00 2001 From: Mohsen Mirhoseini Date: Fri, 16 Feb 2024 14:21:32 +0100 Subject: [PATCH] Fix write dex file error **What** - Fixing the write dex file crash **Why** - https://github.com/tiann/FreeReflection/issues/56 - https://developer.android.com/about/versions/14/behavior-changes-14#safer-dynamic-code-loading **How** - Downgrading the targetSdk to 33 Signed-off-by: Mohsen Mirhoseini --- picture_in_picture/app/build.gradle.kts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/picture_in_picture/app/build.gradle.kts b/picture_in_picture/app/build.gradle.kts index 42f7bb1..401fb64 100644 --- a/picture_in_picture/app/build.gradle.kts +++ b/picture_in_picture/app/build.gradle.kts @@ -8,13 +8,13 @@ plugins { android { namespace = "com.firework.example.pictureinpicture" - compileSdk = 34 + compileSdk = 33 defaultConfig { applicationId = "com.firework.example.pictureinpicture" minSdk = 21 - targetSdk = 34 + targetSdk = 33 versionCode = 1 versionName = "1.0.0" @@ -51,6 +51,11 @@ android { abortOnError = true ignoreWarnings = false warningsAsErrors = true + + disable.apply { + add("OldTargetApi") + add("GradleDependency") + } } buildFeatures { @@ -69,7 +74,7 @@ dependencies { implementation("androidx.appcompat:appcompat:1.6.1") implementation("androidx.constraintlayout:constraintlayout:2.1.4") - implementation("com.google.android.material:material:1.11.0") + implementation("com.google.android.material:material:1.9.0") implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.6.10")) implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")