无法运行。引发“找不到包跳动”错误

时间:2019-11-19 09:18:14

标签: ios xcode macos flutter

This is the error

description: A new Flutter project.


version: 0.9.91+50

environment:
  sdk: ">=2.1.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter


  cupertino_icons: ^0.1.2

  audioplayers: ^0.11.0
  agora_rtc_engine: ^0.9.4
  cached_network_image: ^0.7.0
  country_pickers: ^1.0.1
  dio: ^2.0.22
  flutter_launcher_icons: ^0.7.0
  flutter_rating: ^0.0.2
  fluttery: ^0.0.8
  font_awesome_flutter: ^8.4.0
  get_it: ^1.0.3
  google_sign_in: ^4.0.1+3
  image_picker: ^0.5.0+3
  intl: ^0.15.7
  intro_views_flutter: ^2.4.0
  permission_handler: ^3.0.0
  photo_view: ^0.2.1
  razorpay_plugin: ^0.2.9
  rxdart: ^0.21.0
  shared_preferences: ^0.5.1+1
  side_header_list_view: ^0.0.4
  strings: ^0.1.0
  url_launcher: ^5.0.2
  path_provider: ^0.5.0+1
  screen: ^0.0.5
  flutter_typeahead: ^1.4.0
  flutter_chips_input: ^1.2.0
  intro_slider: ^1.2.0

dev_dependencies:
  flutter_test:
    sdk: flutter

flutter_icons:
  android: "ic_launcher"
  ios: true
  image_path: "assets/images/ic_launcher.jpg"

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:


  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
   - assets/images/
   - assets/


这是我的pubspec.yaml文件。 我已经安装了flutter,并尝试在iPhone中运行现有的flutter项目。 当我尝试运行抖动时,出现此错误。 我尝试搜索解决方案,但找不到。谁能让我知道需要做什么?

2 个答案:

答案 0 :(得分:0)

之所以发生这种情况,是因为flutter用这种方式配置了podfile。由flutter默认生成的podfile将不允许ios构建下载嵌套的依赖项。 要解决此问题,您可以以此更改podfile文件,您的问题将得到解决。 搜索这段代码

target 'Runner' do
  # Flutter Pod

并在下面将其替换

target 'Runner' do
  use_frameworks!
  # Flutter Pod

更新

由于颤振升级,颤振软件包已被移除/暂时关闭。因此,您应该使用

更新pubspec.yaml文件。
  

fluttery_dart2:^ 0.0.9

库使用相同的功能。好吧,一旦原始库恢复使用,该库就不会用很长时间了。

请阅读说明here

答案 1 :(得分:0)

我在pub中找不到飘飘的包裹

可能已删除。选中fluttery_dart2