mirror of
https://github.com/square/leakcanary.git
synced 2026-03-13 08:24:22 +08:00
Fix INSTALL_FAILED_DEPRECATED_SDK_VERSION on API 28+ for leakcanary-android tests
Android 9 (API 28) and above refuse to install APKs that target SDK version < 23. The leakcanary-android module was missing an explicit targetSdk in its defaultConfig, causing the test APK to default to targetSdkVersion = minSdkVersion = 14. leakcanary-android-core already had this fix with an explanatory comment. Apply the same to leakcanary-android so it can run on API 28-34 emulators. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,8 @@ android {
|
||||
compileSdk = libs.versions.androidCompileSdk.get().toInt()
|
||||
defaultConfig {
|
||||
minSdk = libs.versions.androidMinSdk.get().toInt()
|
||||
// Avoid DeprecatedTargetSdkVersionDialog / INSTALL_FAILED_DEPRECATED_SDK_VERSION on API 28+
|
||||
targetSdk = libs.versions.androidCompileSdk.get().toInt()
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildFeatures.buildConfig = false
|
||||
|
||||
Reference in New Issue
Block a user