移动项目时Flutter依赖项中断

时间:2019-01-24 14:44:17

标签: flutter

我正在从事Flutter项目。当项目从玩转变得更加认真时,我决定将其移动到另一个文件夹(用于GitHub存储库)。

但是,这导致了两个依赖关系的破坏:

shared_preferences:^ 0.4.3

一个信号:^ 1.0.5

这是我遇到的错误(基本上,Flutter / Flutter.h无法导入):

=== BUILD TARGET OneSignalNotificationServiceExtension OF PROJECT Runner WITH CONFIGURATION Debug ===
In file included from /Users/rgb/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/ios/Classes/SharedPreferencesPlugin.m:5:
/Users/rgb/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.3/ios/Classes/SharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
=== BUILD TARGET OneSignalNotificationServiceExtension OF PROJECT Runner WITH CONFIGURATION Debug ===
In file included from /Users/rgb/.pub-cache/hosted/pub.dartlang.org/onesignal-1.0.5/ios/Classes/OneSignalPlugin.m:28:
/Users/rgb/.pub-cache/hosted/pub.dartlang.org/onesignal-1.0.5/ios/Classes/OneSignalPlugin.h:28:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>

我尝试删除并添加依赖项,甚至从磁盘,Flutter Clean,Package Get中删除依赖项文件,但似乎无济于事。

Flutter Doctor没有投诉。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

Onessignal软件包太糟糕了。如果可以,请远离。切换到Firebase消息传递,此后再没有一个问题。