代码之家  ›  专栏  ›  技术社区  ›  persec10000

Flutter“google_sign_in”构建失败,出现GTMAppAuth问题-未定义符号_GTMBridgeAssetValid

  •  0
  • persec10000  · 技术社区  · 3 年前

    如果我添加了google_sign_in包,我就无法构建iOS应用程序。

    如果我尝试在Flutter稳定通道上构建项目,那么我从Xcode build中得到了错误输出: XCode输出

    链接GTMAppAuth(armv7)0.1秒 Ld/用户//库/开发人员/Xcode/衍生数据/运行程序bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/Archive-Intermedias/Runner/中介构建文件Path/Pods.Build/Release-iphoneos/GTMAppAuth.Build/Objects-normal/armv7/Binary/GTMAppAuth 普通armv7(在项目“Pod”的目标“GTMAppAuth”中) cd/用户//文档/cardaji/ios/Pods

    /应用程序/Xcode.app/内容/XcodeDefault.xctoolchain/usr/bin/clang -target armv7-apple-ios9.0-dynamiclib-isysroot/应用程序/Xcode.app/内容/开发人员/平台/iPhoneOS.platform/开发人员/SDKs/iPhoneOS14.4.sdk -L/用户/幸运/库/开发人员/Xcode/衍生数据/运行程序bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/ArchiveIntermediates/Runner/BuildProducts路径/发布-iphoneos/GTMAppAuth -F/用户/幸运儿/库/开发人员/Xcode/衍生数据/运行程序bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/ArchiveIntermediates/Runner/BuildProducts路径/Release-iphoneos/GTMAppAuth -F/用户/幸运/库/开发人员/Xcode/衍生数据/运行程序bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/ArchiveIntermediates/Runner/BuildProducts路径/Release-iphoneos/AppAuth -F/用户/幸运/库/开发人员/Xcode/衍生数据/运行程序bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/Archive中介/Runner/BuildProducts路径/Release-iphoneos/GTMSessionFetcher -filelist/用户/幸运/库/开发人员/Xcode/衍生数据/运行程序bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/Archive中介/Runner/中介构建文件Path/Pods.Build/Release-iphoneos/GTMAppAuth.Build/Objects-normal/armv7/GTMAppAuth。链接文件列表 -install_name@rpath/GTMAppAuth.framework/GTMAppAuth-Xlinker-rpath-Xlinker@可执行路径/框架-Xlinker-rpath--Xlinker@loader_path/框架-dead_strip-Xlinkers-object_path_lto-Xlinke器 /用户/幸运儿/库/开发人员/Xcode/衍生数据/运行程序bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/ArchiveIntermediates/Runner/中介构建文件Path/Pods.Build/Release-iphoneos/GTMAppAuth.Build/Objects-normal/armv7/GTMAppAuthory_lto。英语字母表的第15个字母 -fembed bitcode-Xlinker-bitcode_verify-Xlinkers-bitcode_hide_symbols-Xlinker-bitcode_symbol_map-Xlinker/Users/lucky/Library/Developer/Xcode/DerivedData/Runner bdrpdvvoklyybneytvtgveizdgsa/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProducts Path/Release-iphoneos/GTMAppAuth -fobjc arc-fobjc链接运行时-框架安全-weak_framework AuthenticationServices-框架AppAuth-框架基础 -框架GTMSessionFetcher-框架安全性-兼容性_版本1-当前版本1-Xlinker-依赖性_信息-Xlinker/用户/幸运/库/开发人员/XXcode/衍生数据/Runner bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/ArchiveIntermediates/Runner/中介构建文件Path/Pods.Build/Release-iphoneos/GTMAppAuth.Build/Objects-normal/armv7/GTMAppAuthor_dependency _info.dat -o/用户/幸运/库/开发人员/Xcode/衍生数据/运行程序bdrpdvvoklyybneytvtgveizdgsa/构建/中介.noindex/Archive中介/Runner/中介构建文件Path/Pods.Build/Release-iphoneos/GTMAppAuth.Build/Objects-normal/armv7/Binary/GTMAppAuth

    Undefined symbols for architecture armv7:
      "_GTMBridgeAssertValidSelector", referenced from:
          -[GTMAppAuthFetcherAuthorization authorizeRequest:delegate:didFinishSelector:] in
    

    GTMAppAuthFetcher授权。英语字母表的第15个字母 ld:未找到体系结构armv7的符号 clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

    pubspec.yaml

    dependencies:
      flutter:
        sdk: flutter
      google_sign_in: ^5.0.4 
    

    颤振医生

    [✓] Flutter (Channel stable, 2.2.2, on Mac OS X 10.15.6 19G2021 darwin-x64,
        locale en)
    [✓] Xcode - develop for iOS and macOS
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 4.1)
    [✓] Connected device (1 available)
    

    吊舱安装

    Analyzing dependencies
    cloud_firestore: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
    firebase_auth: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
    firebase_core: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
    firebase_messaging: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
    firebase_storage: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
    Downloading dependencies
    Installing AgoraRtcEngine_iOS (3.3.2)
    Installing AppAuth (1.4.0)
    Installing BoringSSL-GRPC (0.0.7)
    Installing FBSDKCoreKit (11.0.1)
    Installing FBSDKCoreKit_Basics (11.0.1)
    Installing FBSDKLoginKit (11.0.1)
    Installing FMDB (2.7.5)
    Installing Firebase (8.0.0)
    Installing FirebaseAuth (8.0.0)
    Installing FirebaseCore (8.0.0)
    Installing FirebaseCoreDiagnostics (8.2.0)
    Installing FirebaseFirestore (8.0.0)
    Installing FirebaseInstallations (8.2.0)
    Installing FirebaseMessaging (8.0.0)
    Installing FirebaseStorage (8.0.0)
    Installing Flutter (1.0.0)
    Installing GTMAppAuth (1.2.2)
    Installing GTMSessionFetcher (1.6.0)
    Installing Google-Mobile-Ads-SDK (8.5.0)
    Installing GoogleAppMeasurement (8.2.0)
    Installing GoogleDataTransport (9.0.1)
    Installing GoogleSignIn (5.0.2)
    Installing GoogleUserMessagingPlatform (2.0.0)
    Installing GoogleUtilities (7.4.1)
    Installing PromisesObjC (1.2.12)
    Installing Toast (4.0.0)
    Installing VoxImplantSDK (2.36.2)
    Installing VoxImplantWebRTC (78.5.1)
    Installing abseil (0.20200225.0)
    Installing agora_rtc_engine (3.3.3)
    Installing app_tracking_transparency (0.0.1)
    Installing assets_audio_player (0.0.1)
    Installing assets_audio_player_web (0.0.1)
    Installing audioplayers (0.0.1)
    Installing cloud_firestore (2.3.0)
    Installing firebase_auth (1.4.1)
    Installing firebase_core (1.3.0)
    Installing firebase_messaging (10.0.3)
    Installing firebase_storage (8.1.3)
    Installing flutter_facebook_auth (2.0.0)
    Installing flutter_local_notifications (0.0.1)
    Installing flutter_notification_channel (0.0.1)
    Installing flutter_voximplant (3.0.0)
    Installing fluttertoast (0.0.2)
    Installing gRPC-C++ (1.28.2)
    Installing gRPC-Core (1.28.2)
    Installing google_mobile_ads (0.0.1)
    Installing google_sign_in (0.0.1)
    Installing image_picker (0.0.1)
    Installing in_app_purchase (0.0.1)
    Installing leveldb-library (1.22.1)
    Installing minimize_app (0.0.1)
    Installing nanopb (2.30908.0)
    Installing path_provider (0.0.1)
    Installing permission_handler (5.1.0+2)
    Installing record_mp3 (0.0.1)
    Installing shared_preferences (0.0.1)
    Installing sqflite (0.0.2)
    Installing video_player (0.0.1)
    Installing wakelock (0.0.1)
    Generating Pods project
    Integrating client project
    Pod installation complete! There are 30 dependencies from the Podfile and 60 total pods installed.
    
    0 回复  |  直到 3 年前
        1
  •  0
  •   persec10000    3 年前

    我未能使用GTMSessionFetcher 1.6.0构建iOS应用程序。 所以我不得不通过编辑Podfile手动将其降级到1.5.0。 我在Podfile中添加了以下行,然后运行“pod install”并再次构建了项目,这是可行的。

    target 'Runner' do
      use_frameworks!
      use_modular_headers!
    
      flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
      pod 'GTMSessionFetcher', '= 1.5.0'  # add this line.
    end
    

    我发现GTMSessionFetcher的最后一个版本是1.6.1。 但无法构建

    吊舱“GTMSessionFetcher”,“=1.6.1”