代码之家  ›  专栏  ›  技术社区  ›  AhMaD AbUIeSa

Flutter unique_确定的库问题?

  •  2
  • AhMaD AbUIeSa  · 技术社区  · 7 年前

    enter image description here

    以下是执行dart构建时的异常堆栈跟踪:

    Launching lib/main.dart on iPhone XR in debug mode...
    Running pod install...
    Starting Xcode build...
    Xcode build done.                                           41.0s
    Failed to build iOS app
    Error output from Xcode build:
    ↳
       ** BUILD FAILED **
    
    
    Xcode's output:
    ↳
        /Users/mac/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/unique_identifier-0.0.3/ios/Classes/UniqueIdentifierPlugin.m:2:9: fatal error: 'unique_identifier/unique_identifier-Swift.h' file not found
        #import <unique_identifier/unique_identifier-Swift.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        1 error generated.
        /Users/mac/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-0.2.1/ios/Classes/FirebaseMessagingPlugin.m:146:75: warning: 'token' is deprecated: Use instanceIDWithHandler: instead. [-Wdeprecated-declarations]
          [_channel invokeMethod:@"onToken" arguments:[[FIRInstanceID instanceID] token]];
                                                                                  ^
        In module 'FirebaseInstanceID' imported from /Users/mac/Desktop/test/ios/Pods/Headers/Private/Firebase/Firebase.h:46:
        /Users/mac/Desktop/test/ios/Pods/FirebaseInstanceID/Frameworks/FirebaseInstanceID.framework/Headers/FIRInstanceID.h:201:30: note: 'token' has been explicitly marked deprecated here
        - (nullable NSString *)token __deprecated_msg("Use instanceIDWithHandler: instead.");
                                     ^
        In module 'Foundation' imported from Headers/Private/FirebaseCore/FIRAnalyticsConfiguration.h:17:
        In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
        In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
        /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/usr/include/sys/cdefs.h:180:48: note: expanded from macro '__deprecated_msg'
                #define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))
                                                              ^
        1 warning generated.
    

    ***更新上面的内容[通过删除文件并再次手动添加来更正上述错误,但现在出现了另一个问题,即获取唯一标识符的代码称为异常发生]

    enter image description here

    我很感激你的帮助

    0 回复  |  直到 7 年前