AGP升级助手

问题描述 投票:0回答:1
  • 出了什么问题: 配置项目“:connectivity”时出现问题。

无法创建 com.android.build.api.variant.impl.LibraryVariantBuilderImpl 类型的实例。 未指定命名空间。在模块的构建文件中指定命名空间。有关设置命名空间的信息,请参阅 https://d.android.com/r/tools/upgrade-assistant/set-namespace

 If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
  • 尝试:

使用 --stacktrace 选项运行以获取堆栈跟踪。 使用 --info 或 --debug 选项运行以获得更多日志输出。 使用 --scan 运行以获得完整的见解。 在 https://help.gradle.org 获取更多帮助。

1m 3s 内构建失败 错误:Gradle 任务 assembleDebug 失败,退出代码为 1

Android 上的应用程序生成器文章

android flutter gradle build flutter-build
1个回答
0
投票

只需转到app/build.gradle

包中的
connectivity
,然后添加以下行即可解决问题:

   android { namespace "add connectivity package namespace" ---------}

要获取正确的命名空间,请检查 AndroidManifest.xml 文件中

Connectivity
的包名称。

© www.soinside.com 2019 - 2024. All rights reserved.