После обновления флаттера, когда я создавал свое приложение, я начал получать следующую ошибку:
Не удалось выполнить задачу ': app: processDebugManifest'. [+5 мс]>
Ошибка слияния манифеста: Атрибут
meta-data#android.support.VERSION@value value = (25.4.0) из
[com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml: 28: 13-35
[+23 мс] также присутствует на
[com.android.support:support-v4:26.1.0] AndroidManifest.xml: 28: 13-35
значение = (26.1.0). [+8 мс] Предложение: добавить
'tools: replace = "android: value"' для элемента в
AndroidManifest.xml: 26: 9-28: 38 для переопределения.
Как объяснено в , добавьте 'tools: replace = "Android: value"' к элементу в AndroidManifest и
Android: ошибка «Ошибка слияния манифеста» после обновления до новой версии gradle ТАК я ответил, что добавил
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.4.0'
}
}
}
}
в папку с моим приложением build.gradle
:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 27
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.yourcompany.chatapp"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.4.0'
}
}
}
}
apply plugin: 'com.google.gms.google-services'
Теперь, когда я запускаю свое приложение, я получаю следующую ошибку:
Error -32601 received from application: Method not found
Я пробовал, запустив flutter clean
, ошибка все еще сохраняется.
Вот вывод flutter doctor
:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.3.1, on Microsoft Windows [Version 10.0.16299.371], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.0-rc1)
[√] Android Studio (version 3.1)
[√] Connected devices (1 available)
• No issues found!