Android 颤振图像选择器无法解析配置的所有瑕疵

Android 颤振图像选择器无法解析配置的所有瑕疵,android,flutter,gradle,Android,Flutter,Gradle,在pubspec.yaml文件中添加图像选择器后 我正在尝试运行我的颤振应用程序,但运行失败 我尝试运行颤振项目时出现的错误: FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':image_picker'. > Could not resolve all artifacts for configuration ':imag

在pubspec.yaml文件中添加
图像选择器后

我正在尝试运行我的颤振应用程序,但运行失败

我尝试运行颤振项目时出现的错误:

FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':image_picker'. > Could not resolve all artifacts for configuration ':image_picker:classpath'. > Could not find crash.jar (com.android.tools.analytics-library:crash:26.3.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/crash/26.3.0/crash-26.3.0.jar > Could not find apkzlib.jar (com.android.tools.build:apkzlib:3.3.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/3.3.0/apkzlib-3.3.0.jar > Could not find apksig.jar (com.android.tools.build:apksig:3.3.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.3.0/apksig-3.3.0.jar > Could not find annotations.jar (com.android.tools:annotations:26.3.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.3.0/annotations-26.3.0.jar > Could not find databinding-common.jar (androidx.databinding:databinding-common:3.3.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/3.3.0/databinding-common-3.3.0.jar > Could not find baseLibrary.jar (com.android.databinding:baseLibrary:3.3.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.3.0/baseLibrary-3.3.0.jar > Failed to notify project evaluation listener. > Could not get unknown property 'android' for project ':image_picker' of type org.gradle.api.Project. > Could not find method implementation() for arguments [project ':flutter_plugin_android_lifecycle'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. * 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 9s
build.gradle内容:
1-检查依赖项是否安装良好 如果可以的话 2-尝试重新调试应用程序 如果不是 2-尝试安装Flatter SDK开发人员版本,而不是稳定版本

编辑 3-在终端中执行此命令

flutter clean
清理旧建筑


第二次推荐
flatter pub缓存修复

试试这个,希望这能起作用。如果您正在使用android studio在颤振项目中打开android文件夹,然后运行clean项目,然后运行rebuild project@mohammad al-lababediThank you@Ahmed Elsayed问题解决了解决此问题的步骤它:-1将SDK从stable替换为dev-2在termenal中我首先执行此命令
flatter clean
清理旧版本
flatter pub cache repair
-3最后我运行了该项目,它运行良好
buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
     google()
    mavenCentral()
    jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
 repositories {
     google()
    mavenCentral()
    jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
flutter clean