[英]FLUTTER Android Studio BUMBLEBEE: Generating signed bundle requires you to update the Android Gradle plugin to version 3.2.0 or higher
When I try to build > generate signed bundle
AS complains:当我尝试build > generate signed bundle
AS 抱怨:
Generating signed bundle requires you to update the Android Gradle plugin to version 3.2.0 or higher生成签名包需要您将 Android Gradle 插件更新到版本 3.2.0 或更高版本
If I click on Close this dialog and update the plugin
A further dialog appears (AS Bumblebee) titled update the Android Gradle plugin
If I hit OK, the dialog vanishes, nothing happens, and I get the same complaint when I try to build a signed app bundle again.如果我单击Close this dialog and update the plugin
,则会出现另一个对话框(AS Bumblebee),标题为update the Android Gradle plugin
再次应用程序包。
This is really frustrating because I can't upload an app with Googlemaps without signing it.这真的很令人沮丧,因为我无法在没有签名的情况下使用 Googlemaps 上传应用程序。 That's my whole app!这就是我的整个应用程序!
OK well similar problems have been answered a few times on StackOverflow, but some of the solutions have become antiquated other solutions don't seem relevant:好吧,类似的问题已经在 StackOverflow 上回答了几次,但有些解决方案已经过时,其他解决方案似乎不相关:
File > project structure
in Android Studio Bumblebee.我看不到通过 Android Studio Bumblebee 中的File > project structure
更新 Gradle 的方法。android/build.gradle
, well it already has gradle 7.03, which is way above 3.2.0.如果我尝试在android/build.gradle
中手动更新 Gradle,那么它已经有了 gradle 7.03,远高于 3.2.0。 Although Gradle and Android Studio's Gradle plugin may have different version numbers.虽然 Gradle 和 Android Studio 的 Gradle 插件可能有不同的版本号。 See the code snippet below.请参阅下面的代码片段。Preferences > SDK tools
, but no mention of a gradle plugin.我一直在寻找Preferences > SDK tools
,但没有提到 gradle 插件。 This is the relevant part of my android/build.gradle
file:这是我的android/build.gradle
文件的相关部分:
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.5'
}
FURTHER investigation, gradle-wrapper.properties
contains this: distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
进一步调查, gradle-wrapper.properties
包含以下内容: distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
Which is a different version number to my android/build.gradle
:与我的android/build.gradle
不同的版本号:
classpath 'com.android.tools.build:gradle:7.0.3'
I'm not sure why they have different numbers.我不知道为什么他们有不同的数字。
This is the last hurdle for one app, and a roadblock in another, please help.这是一个应用程序的最后一个障碍,另一个应用程序的障碍,请帮助。 I'm totally lost, I've begun to think maybe a Kotlin plugin upgrade has caused havoc somehow.我完全迷路了,我开始认为 Kotlin 插件升级可能以某种方式造成了严重破坏。
UPDATE I've reported the issue to Google, via AS's help menu, and in doing so the report said this...更新我已经通过 AS 的帮助菜单向谷歌报告了这个问题,在这样做的时候报告说这个......
AS: Bumblebee |如:大黄蜂 | 2021.1.1; 2021.1.1; Kotlin plugin: 211-1.6.10-release-923-AS7442.40; Kotlin 插件:211-1.6.10-release-923-AS7442.40; Android Gradle Plugin: (plugin information not found); Android Gradle 插件:(未找到插件信息); Gradle: (gradle version information not found); Gradle:(未找到gradle版本信息); Gradle JDK: version 11.0.11; Gradle JDK:版本 11.0.11; NDK: from local.properties: (not specified), latest from SDK: (not found); NDK:来自local.properties:(未指定),最新来自SDK:(未找到); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); LLDB:未找到固定版本 3.1,最新来自 SDK:(未找到包); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found) CMake:来自 local.properties:(未指定),最新来自 SDK:(未找到),来自 PATH:(未找到)
That's a lot of things missing.那是很多东西都不见了。 Both gradle and the gradle plugin, I've tried creating a fresh project in AS Bumblebee then asking for a signed bundle but get the same complaint. gradle 和 gradle 插件,我尝试在 AS Bumblebee 中创建一个新项目,然后要求一个签名包,但得到了同样的抱怨。 so it's not because the projects have taken a while.所以这不是因为这些项目花了一段时间。
Any solutions are appreciated.任何解决方案表示赞赏。 I thought you just downloaded Android Studio and it was all good to go... sigh .我以为你刚刚下载了 Android Studio,对 go 来说一切都很好……叹息。
In Settings, 'Build, Execution, Deployment', 'Build Tools', 'Gradle' I had a 'Use Gradle From' set to a 'Specified Location' and it was breaking the build.在“设置”、“构建、执行、部署”、“构建工具”、“Gradle”中,我将“使用 Gradle From”设置为“指定位置”,它破坏了构建。 It must have come from some previous version.它一定来自某个以前的版本。 I changed it to "'gradle-wrapper.properties' file" and everything went fine.我将其更改为“'gradle-wrapper.properties'文件”,一切顺利。
I also noted a much larger 'aab' file in Bumblebee.我还注意到 Bumblebee 中有一个更大的“aab”文件。 I know I added stuff, but not 8 megabytes worth.我知道我添加了一些东西,但不是 8 兆字节。 It was only code, and maybe a thousand lines.它只是代码,也许有一千行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.