简体   繁体   English

我的 flutter 应用程序 android build.gradle 文件没有默认配置和应用程序 ID

[英]My flutter application android build.gradle file does not have Default config and application ID

    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

This is my build.graddle file from my fresh flutter default app.这是我新的 flutter 默认应用程序中的 build.gradle 文件。 How can i link the android aspect to firebase?如何将 android 方面链接到 firebase?

any resources with a recent date to this effect will be very much appreciated.非常感谢具有最近日期的任何资源。

the problem i have with the code above is that their is no ApplicationID.我在上面的代码中遇到的问题是它们不是 ApplicationID。 I am thinking something is wrong with my build.graddle, which makes me question my installation of flutter or android studio or something.我在想我的 build.graddle 有问题,这让我质疑我安装的 flutter 或 android studio 之类的东西。

There is nothing wrong with your build.gradle. You're just looking into Root level of build.gradle file of android in your flutter project.您的 build.gradle 没有任何问题。您只是在查看 flutter 项目中 android 的 build.gradle 文件的根级别。 You need to check into android/app/build.gradle.您需要检查 android/app/build.gradle。

There are two build.gradle file in an android project.一个android项目中有两个build.gradle文件。

  1. android/build.gradle android/build.gradle
  2. android/app/build.gradle (check here) android/app/build.gradle(检查这里)

See the screenshot of my selected file and it's path.查看我选择的文件的屏幕截图及其路径。

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:无法解析 Android 应用程序模块的 Gradle 配置。 解析或重新同步(构建 gradle 应用程序中没有存储库) - Error: Could not parse the Android application Module's Gradle Config. Resolve or resync (no repositories in build gradle app) 我的构建配置为在项目存储库上设置存储库,build.gradle 构建文件添加了存储库“Google” - My build is configured to settings repositories over project repositories, repository ‘Google’ was added by build.gradle build file 在 Android Studio 中为 firebase Flutter 生成 SHA1 密钥时出现 Build.gradle 错误 - Build.gradle error while Generating SHA1 key for firebase Flutter in Android Studio 无法解析 Android 应用模块的 Gradle 配置 - Could not parse the Android Application Module's Gradle config build.gradle 中没有 firebase 的方法 - No methods for firebase in build.gradle 错误:无法解析 Android 应用程序模块的 Gradle 配置 - Error: Could not parse the Android application Module's Gradle Config 无法为 flutter 的模拟器构建应用程序 - Could not build application for the simulator for flutter build.gradle需要加Firebase分析吗? - Is it required to add Firebase Analytics to build.gradle? 将 firebase 依赖项添加到 android 应用程序时,应用脚本 build.gradle 错误 - Apply script build.gradle error when adding firebase dependencies to an android app “找不到 ID 为‘io.fabric’的插件”错误。 从 build.gradle 中取出织物后 - "Plugin with id 'io.fabric' not found" error. after removing fabric from build.gradle
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM