我是新手,请尝试构建跟踪位置应用。我的抖动版本是Flutter 1.18.0-7.0.pre.21 • channel master • https://github.com/flutter/flutter.git
,而flutter doctor
是 No issues found!
。我在项目中使用API Google Map,并且具有google_map_package。 。当我调试该应用程序时,问题出在Execution failed for task ':app:processDebugResources'.
Settings.gradle
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
答案 0 :(得分:1)
您看到此错误,因为Android Studio不知道您的计算机中Flutter的安装位置。您需要像这样在local.properties文件中明确指定:
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Fri Aug 14 13:14:39 PDT 2020
sdk.dir=C\:\\Users\\username\\AppData\\Local\\Android\\Sdk
flutter.versionName=1.2.0
flutter.sdk=C\:\\Users\\username\\flutter