Skip to content

flutter 升级最新版本后 Android 彻底不能使用,引入无法编译运行。急急急!谢谢 #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
15949893621 opened this issue Mar 21, 2025 · 2 comments

Comments

@15949893621
Copy link

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

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.
@nosun
Copy link

nosun commented May 12, 2025

解决方案:

  1. 进入~/.pub-cache/hosted/pub.dev/weibo_kit-4.0.0/android/目录

编辑 build.gradle
进入 weibo_kit/android/build.gradle,在 android {} 块中添加:

namespace 'io.github.v7lin.weibo_kit'
  1. 清理缓存,重新编译
flutter clean
flutter pub get
flutter build apk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants