集成flutter报错

eryeah 28天前 126

Launching lib/main.dart on MI 8 Lite in debug mode... Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':imclient'.

    Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the 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.

  • Try:

    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.

BUILD FAILED in 3s Error: Gradle task assembleDebug failed with exit code 1

最新回复 (5)
  • x86 28天前
    引用 2
    改了什么吗?

    什么都不修改,直接跑 demo 正常吗?
  • eryeah 28天前
    引用 3
    跑demo正常, 集成到自己项目中失败, 开发工具: Android Studio Koala Feature Drop | 2024.1.2, distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip, 是不是哪里版本不对
  • HeavyRain 28天前
    引用 4
    百度搜索一下 Namespace not specified. Specify a namespace in the module's build file
  • eryeah 28天前
    引用 5
    安卓端可以了
  • HeavyRain 28天前
    引用 6
    什么原因?怎么修改的?
返回