gradle错误链接到build.gradle文件上的命名空间

kxeu7u2r  于 2023-06-23  发布在  其他
关注(0)|答案(1)|浏览(214)

我一直有这个错误,但我已经做了他们要求我做的。
这就是错误:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':audio_service'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Please specify a namespace in the module's build.gradle file like so:

     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.

BUILD FAILED in 2m 56s
Exception: Gradle task assembleDebug failed with exit code 1

这是我的build.gradle文件要求khoi。
谢谢大家

ifmq2ha2

ifmq2ha21#

找到了解决问题的办法。
1.工具选项卡> flutter >在Android Studio中打开Android模块
1.文件选项卡>项目结构>项目

  1. Android Gradle插件版本:7.0.4和Gradle版本至7.6.1
  2. flutter pub升级
    1.更新所有插件

相关问题