我是颤振的新手,正在尝试构建一个跟踪位置应用程序。我的扑动版本是Flutter 1.18.0-7.0.pre.21 • channel master • https://github.com/flutter/flutter.git
and flutter doctor
is No issues found!
。我在我的项目中使用 API Google 地图并有 google_map_package。 。当我调试这个应用程序时显示问题是Execution failed for task ':app:processDebugResources'.
设置.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"
您看到此错误是因为 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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)