根据 Google 将目标 SDK 升级到最低 33 的新要求,我开始这样做,并且在我的大多数应用程序中都遇到了相同的错误,并且我无法解决它,请帮助,错误是
'''配置项目':fluttertoast'时出现问题。
无法创建 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.'''
我确信命名空间已添加到我的“build.gradle”中,我也尝试将 flutterToast 更新到 8.2.2,但结果相同
检查repo代码后,似乎已修复但未发布到pub服务器。您可以将这些行用于您的 pubspec:
dependencies:
fluttertoast:
git:
url: https://github.com/ponnamkarthik/FlutterToast.git