请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

flutter_trip运行不起来

pub get报错
The plugin flutter_splash_screen uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

正在回答 回答被采纳积分+3

1回答

CrazyCodeBoy 2023-10-19 21:51:41
这是一个警告log,不影响运行。运行不起来,应该还有别的原因,你贴一下完整logo我帮你看一看。
0 回复 有任何疑惑可以回复我~
  • 提问者 宝慕林653982 #1
    没找到SearchBar
    'SearchBar' isn't a function.
    Try correcting the name to match an existing function, or define a method or function named 'SearchBar'.
    The name 'SearchBar' is defined in the libraries 'package:flutter/src/material/search_anchor.dart (via package:flutter/material.dart)' and 'package:flutter_trip/widget/search_bar.dart'.
    Try using 'as prefix' for one of the import directives, or hiding the name from all but one of the imports.
    
    Error (Xcode): lib/pages/search_page.dart:125:22: Error: 'SearchBar' is imported from both
    'package:flutter/src/material/search_anchor.dart' and 'package:flutter_trip/widget/search_bar.dart'.
    回复 有任何疑惑可以回复我~ 2023-10-24 15:05:33
  • CrazyCodeBoy 回复 提问者 宝慕林653982 #2
    你运行的是自己写的代码吗?还是课程仓库中的源码的代码呢?https://git.imooc.com/coding-321/
    回复 有任何疑惑可以回复我~ 2023-10-24 23:08:02
  • 提问者 宝慕林653982 回复 CrazyCodeBoy #3
    运行的仓库中的源码,把demo文件夹删除后,把environment下 sdk: '>=3.1.3 <4.0.0' cupertino_icons: ^1.0.2 然后pub get就剩下上面的报错信息了
    回复 有任何疑惑可以回复我~ 2023-10-25 10:09:12
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信