android - 在 Flutter 项目的 build.gradle 中找不到 android 块
问题描述
我使用创建了一个 Flutter 项目flutter create my_app
,它为我提供了一个完美运行的 Flutter 演示主页和一个反例。
我现在正在按照官方文档测试应用程序的部署。我已根据需要创建了一个密钥库和一个文件,但在此处提到的文件中key.properties
找不到该android
块。
我尝试构建应用程序并在手机上启动它,但仍然缺少该块。我应该手动添加它还是我可能错过了一个步骤?build.grandle
build.gradle
android
编辑:
这是我的 build.gradle 文件
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
解决方案
该文件是android/app/build.gradle
而不是/android/build.gradle
.
对不起
推荐阅读
- python - 在 Pandas 中跨多个列的 if 语句
- csv - 使用 Linux 工具计算 csv 文件中数据的百分位数
- python - 如何使用 Flask 以管理员身份自动创建“.html”页面和路由?
- automation - 赛普拉斯 - 如何使用文本字段中的值获取元素
- activemq-artemis - ConnectionFactory 在共享时抛出错误
- django - 通过 TemplateView 保存表单
- amazon-web-services - 为 IP 设置 WAF 规则豁免
- excel - 不想在excel中显示空值
- python - 使用框架中的列数据创建新列
- groovy - 自定义 JaCoCo Gradle 插件 - 在报告中排除文件