fa_pub下载下来后运行在android设备报错

来源:1-8 本章作业

weixin_慕移动0487692

2024-03-27

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/Users/admin/.pub-cache/hosted/pub.flutter-io.cn/package_info_plus-4.2.0/android/build.gradle’ line: 31

  • What went wrong:
    A problem occurred evaluating project ‘:package_info_plus’.

Could not find method namespace() for arguments [dev.fluttercommunity.plus.packageinfo] on extension ‘android’ of type com.android.build.gradle.LibraryExtension.

  • 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.

BUILD FAILED in 24s

写回答

1回答

CrazyCodeBoy

2024-03-28

你遇到的错误信息指出,在评估`:package_info_plus`项目时出现了问题,具体是找不到`namespace()`方法。这通常发生在Gradle配置中,尤其是当你的项目依赖的插件或者库的Gradle配置与你的项目当前使用的Android Gradle Plugin版本不兼容。你可以尝试通过下面方式解决:

**更新`package_info_plus`插件**:确保你使用的`package_info_plus`插件是最新版本的,因为较新的版本可能已经解决了这个问题。
0
0

Flutter高级进阶实战-仿哔哩哔哩-掌握Flutter高阶技能

一次性掌握Flutter高阶技能+商业级复杂项目架构设计与开发方案

1722 学习 · 870 问题

查看课程