【发布时间】:2021-11-02 12:26:35
【问题描述】:
我正在尝试将 firestore 添加到我的笔记应用程序以存储我的笔记,当我运行它时出现此错误:
Build file '~/StudioProjects/noteapp/android/app/build.gradle' line: 29
* What went wrong:
A problem occurred evaluating project ':app'.
> No signature of method: build_9oqkz1yq0b57t4arqvsiar91y.android() is applicable for argument types: (build_9oqkz1yq0b57t4arqvsiar91y$_run_closure2) values: [build_9oqkz1yq0b57t4arqvsiar91y$_run_closure2@2d8103c5]
这是我的 build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.example.noteapp"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
multiDexEnabled true
signingConfig signingConfigs.debug
minifyEnabled false
useProGaurd false
shrinkResources false
}
}
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:28.4.0')
implementation 'com.google.firebase:firebase-analytics'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
我该如何解决这个问题?告诉我你是否也需要我的 main.dart。
编辑:解决了这个问题: Gradle DSL method not found: 'runProguard'
【问题讨论】:
-
您是否尝试清理构建和重建?
-
@gtxtreme 是的,我做到了
-
@LalitFauzdar 我试过了,因为我没有实验功能所以没用
标签: android flutter dart gradle google-cloud-firestore