Код: Выделить всё
I am using Flutter and on android folder I ran ./gradlew clean build
But I get the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':audio_session:processDebugAndroidTestManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [androidx.fragment:fragment:1.7.1] /Users/username/.gradle/caches/transforms-3/0f117a371f06cfd8b338874039e78472/transformed/fragment-1.7.1/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="androidx.fragment" to force usage (may lead to runtime failures)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.6.3/userguide/command_line_interface.html#sec:command_line_warnings
My AndroidManifest.xml file is as follows:
My build.grade in the app level is as follows:
plugins {
id "com.android.application"
// START: FlutterFire Configuration
id 'com.google.gms.google-services'
// END: FlutterFire Configuration
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
def keystorePropertiesFile = rootProject.file('key.properties') // Correct path here
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
def localProperties = new Properties()
def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty("flutter.versionCode", "1") // Default to 1 if not found
def flutterVersionName = localProperties.getProperty("flutter.versionName", "1.0.0") // Default to 1.0.0 if not found
android {
namespace = "app.tonns.trashcanfinder"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId = "app.tonns.trashcanfinder"
minSdk = 23
targetSdk = flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger() // Use version code from local.properties
versionName flutterVersionName // Use version name from local.properties
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
// Optional: Enable code minification with Proguard (if needed)
// minifyEnabled true
// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
flutter {
source = "../.."
}
When I clicj on the error link its as follows:
Can someone please sugges how can I get rid of this error? Thank you!
Может кто-нибудь подскажет, как мне избавиться от этой ошибки? Спасибо!
Может кто-нибудь подскажет, как мне избавиться от этой ошибки? Спасибо!
Может кто-нибудь подскажет, как мне избавиться от этой ошибки? Спасибо!
Может кто-нибудь подскажет, как мне избавиться от этой ошибки? Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/792 ... or-android
Мобильная версия