0

在颤振升级(稳定)之后,我在 iOS 上启动应用程序时开始出现不同的错误(取决于我目前使用的“终极解决方案”),但它总是说no such file or directory: 'shared_preferences'

Launching lib/main.dart on iPhone 13 in debug mode...
Running pod install...                                             11.3s
Running Xcode build...                                                  
 └─Compiling, linking and signing...                      2,944ms
Xcode build done.                                           89.0s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    ld: warning: linking against a dylib which is not safe for use in application extensions:
    /Users/.../Documents/Dev/.../Mobile
    App/.../build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/OneSignalXCFramework/OneSignal.f
    ramework/OneSignal
    error: the following command failed with exit code 0 but produced no further output
    Ld /Users/.../Documents/Dev/.../Mobile\
    App/.../build/ios/Debug-iphonesimulator/OneSignalNotificationServiceExtension.appex/OneSignalNoti
    ficationServiceExtension normal (in target 'OneSignalNotificationServiceExtension' from project
    'Runner')
    clang: error: no such file or directory: 'shared_preferences'
    Command Ld failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

我已经尝试了所有“终极解决方案”,例如:

flutter clean
flutter pub get
flutter pub upgrade
cd iOS
pod install
pod update 
$ rm ios/Flutter/Flutter.podspec
$ rm -fr ios/Pods
$ rm ios/Podfile
$ flutter clean
flutter channel beta/master/stable
flutter pub cache repair
reinstall flutter
reinstall Xcode
flutter downgrade to last working version

没有任何效果。有谁知道我该如何解决这个问题?

4

0 回答 0