Ошибка отладки Flutter со сторонним SDK — не удалось выполнить задачу «:app:checkDebugAarMetadata». > Не удалось разрешиAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Ошибка отладки Flutter со сторонним SDK — не удалось выполнить задачу «:app:checkDebugAarMetadata». > Не удалось разреши

Сообщение Anonymous »

Я пытаюсь интегрировать сторонний SDK для Android в свой проект Flutter. После многих проблем код, вероятно, будет выглядеть как Франкештейн, я не понимаю, что мне не хватает или что я делаю неправильно. Я постоянно получаю следующую ошибку:

Код: Выделить всё

       - https://repo.maven.apache.org/maven2/io/flutter/x86_64_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_64_debug-1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.pom
- https://jitpack.io/io/flutter/x86_64_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_64_debug-1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.pom
- https://plugins.gradle.org/m2/io/flutter/x86_64_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_64_debug-1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.pom
Required by:
project :app
> Could not find io.flutter:x86_debug:1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.
Searched in the following locations:
- https://jcenter.bintray.com/io/flutter/x86_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_debug-1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.pom
- https://dl.google.com/dl/android/maven2/io/flutter/x86_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_debug-1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.pom
- https://repo.maven.apache.org/maven2/io/flutter/x86_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_debug-1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.pom
- https://jitpack.io/io/flutter/x86_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_debug-1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.pom
- https://plugins.gradle.org/m2/io/flutter/x86_debug/1.0.0-c4cd48e186460b32d44585ce3c103271ab676355/x86_debug-1.0.0-c4cd48e186460b32d44585ce3c103271ab676355.pom
Required by:
project :app

* 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

BUILD FAILED in 11s
Error: Gradle task assembleDebug failed with exit code 1
Мой файл android/build.gradle

Код: Выделить всё

buildscript {
ext.kotlin_version = '1.7.10'

repositories {
google()
mavenCentral()
jcenter()
maven {
url 'http://download.flutter.io'
allowInsecureProtocol = true
}
}
dependencies {
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath fileTree(dir: 'libs', include: '*.jar')

}
}

plugins {
id 'com.android.application' version '7.4.1' apply false
id 'com.android.library' version '7.4.1' apply false
id 'org.jetbrains.kotlin.android' version "1.5.31"  apply false
id 'dev.flutter.flutter-gradle-plugin' version '1.0.0'apply false
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
}
и мой файл app/build.gradle

Код: Выделить всё

         plugins {
id 'com.android.application'
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
id 'org.jetbrains.kotlin.android'
}

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')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

android {
namespace "com.example.ble_prova"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/         build/application-id.html).
applicationId "com.example.ble_prova"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-         gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

}

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 {
implementation project(path: ':mokosupport')
implementation files('app\\libs\\gradle-wrapper.jar')
implementation files('app\\libs\\mokoBleLib.jar')
implementation files('app\\libs\\mokoSupport.jar')
implementation files('gradle\\wrapper\\gradle-wrapper.jar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation files('/Users/username/Developer/flutter/bin/cache/artifacts/engine/         android-                                    arm64-release/flutter.jar')
}
Мой файл settings.gradle:

Код: Выделить всё

     pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()

includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

repositories {
gradlePluginPortal()
google()
mavenCentral()
mavenLocal()
jcenter()
maven {
url 'http://download.flutter.io'
allowInsecureProtocol = true
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" apply false
id "dev.flutter.flutter-gradle-plugin" version "1.0.0"  apply false
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
jcenter()
google()
mavenCentral()
maven { url "https://jitpack.io" }
gradlePluginPortal()
}
}

rootProject.name = "ble_prova"

include ':app',':mokosupport'
Я удалил строки

Код: Выделить всё

id "com.android.application" version "7.3.0" apply false
id "com.android.tools" version "7.5.1" apply false
потому что я думал, что это проблема совместимости между Android Tool и версией Gradle, но ошибка та же самая.
Пожалуйста, помогите мне понять, что Я делаю неправильно.
Спасибо

Подробнее здесь: https://stackoverflow.com/questions/784 ... k-appcheck
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Android»