我的项目通过“ flutter run”完美运行,但是每次我在Android Studio上打开“ android”模块时,都会遇到这些错误:
我可以编辑代码但无法构建代码:
ERROR: Unable to resolve dependency for ':app@debugDynamicProfile/compileClasspath': Could not resolve project :flutter_image_compress.
Show Details
Affected Modules: app
ERROR: Unable to resolve dependency for ':app@debugDynamicProfile/compileClasspath': Could not resolve project :get_version.
Show Details
Affected Modules: app
这是我的项目build.gradle:
buildscript {
ext.kotlin_version = '1.3.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}