简体   繁体   English

FLUTTER Android Studio BUMBLEBEE:生成签名包需要您将 Android Z7B5CC4FB56E21DC7520F71A 或更高版本的插件更新到 3 版本。

[英]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 上回答了几次,但有些解决方案已经过时,其他解决方案似乎不相关:

  1. I can see no way to update Gradle through File > project structure in Android Studio Bumblebee.我看不到通过 Android Studio Bumblebee 中的File > project structure更新 Gradle 的方法。
  2. If I try and update Gradle manually in 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.请参阅下面的代码片段。
  3. I've tried using Android Studio's search box with 'update Gradle plugin' to no effect.我尝试使用 Android Studio 的搜索框和“更新 Gradle 插件”无效。
  4. I've hunted around Preferences > SDK tools , but no mention of a gradle plugin.我一直在寻找Preferences > SDK tools ,但没有提到 gradle 插件。
  5. Instead of using an app bundle I've tried generating a signed APK, but that has problems too, and the file is larger, so no easy solution.我没有使用应用程序包,而是尝试生成一个签名的 APK,但这也有问题,而且文件更大,所以没有简单的解决方案。

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.

相关问题 将 Android Gradle 插件更新到 3.2.0 或更高版本/生成 Flutter 签名的 APK - Update the Android Gradle plugin to version 3.2.0 or higher / generate Flutter signed APK Flutter Android gradle 插件到版本 3.2.0 或更高版本 - Flutter Android gradle plugin to version 3.2.0 or higher Android Studio更新Bumblebee后,该项目不是基于Gradle的项目 - After Android Studio Update Bumblebee, The project is not a Gradle-based project Flutter | Android Gradle插件仅支持Kotlin Gradle插件版本1.3.0及以上 - Flutter | The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher Flutter: Android Gradle 插件需要Java 11才能运行。 您当前使用的是 Java 1.8 - Flutter : Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8 您的项目需要更新版本的 Kotlin Gradle 插件。 (安卓工作室) - Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio) 将 android 工作室更新为 BumbleBee 后。 Flutter 中的 IOS 应用程序运行问题 - After update the android studio to BumbleBee. IOS App Run Issue in Flutter 为什么会报错:Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher - Why do I get the error: Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher 如何解决“Android Gradle 插件仅支持 Kotlin Gradle 插件版本 1.5.20 及更高版本”的异常。 - How to solve the exception "The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher." Android Gradle 插件仅支持 Kotlin Gradle 插件版本 1.3.10 及更高版本 - The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM