Flutter插件在Android Studio Flamingo with Gradle 8.0.0上崩溃

qoefvg9y  于 2023-05-07  发布在  Flutter
关注(0)|答案(1)|浏览(311)

正在调试模式下在sdk gphone x86 64上启动lib\main.dart...正在运行Gradle任务“assembleDebug”...启用Flutter多重索引支持的构建。
失败:生成失败,出现异常。

  • 出了什么问题:配置项目“:android_alarm_manager_plus”时出现问题。(www.example.com '上的大多数插件pub.dev崩溃。)

无法创建com.android.build.api.variant.impl.LibraryVariantBuilderImpl.类型的示例。未指定命名空间。请在模块的build.gradle文件中指定命名空间,如下所示:

android {
     namespace 'com.example.namespace'
 }

 If the package attribute is specified in the source AndroidManifest.xml, it can be migrated automatically to the namespace value in the build.gradle file using the AGP Upgrade Assistant; please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.
  • 尝试:

使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。使用--scan运行以获得完整的见解。

BUILD FAILED in 18 s异常:Gradle任务assembleDebug失败,退出代码为% 1
这是升级后造成的&遵循火烈鸟上的AGP升级助手。升级火烈鸟补丁后也尝试过。
在build.gradle(APP)中添加
applicationId "com.example.app"
其他设置
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
classpath 'com.android.tools.build:gradle:8.0.0'
我在升级到Gradle 8.0.0和Java 17后发生了这种情况。

dauxcl2d

dauxcl2d1#

目前我正在降级Android Studio Electic EEL

distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip

classpath 'com.android.tools.build:gradle:7.4.2'

等待其他社区成员的建议或直到问题得到解决

相关问题