Programming/Flutter

[Flutter] flutter run하는데 갑자기 에러날 때

devssun 2021. 2. 11. 13:09
728x90
반응형

시초는 플러터 프로젝트 리팩토링을 하면서 폴더 구조를 조금씩 바꾸다가 한번에 바꿨었는데.. 그 이후로부터 빌드가 실패하기 시작했다.

커밋 돌아가도 안되고.. 이상했는데 막 해보다가 겨우겨우 해결했다..

 

추가로 카카오 sdk에서도 오류가 나서 버전을 올려 설치했다.

 

더보기

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...

Running pod install...                                              1.1s

CocoaPods' output:

      Preparing

 

    Analyzing dependencies

 

    Inspecting targets to integrate

      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

 

    Finding Podfile changes

      - Flutter

      - device_info

      - firebase_analytics

      - firebase_core

      - firebase_crashlytics

      - in_app_review

      - kakao_flutter_sdk

      - package_info

      - shared_preferences

      - sign_in_with_apple

      - url_launcher

 

    Fetching external sources

    -> Fetching podspec for `Flutter` from `Flutter`

    -> Fetching podspec for `device_info` from `.symlinks/plugins/device_info/ios`

    -> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`

    [!] Failed to load 'firebase_analytics' podspec: 

    [!] Invalid `firebase_analytics.podspec` file: undefined method `ui' for File:Class.

 

     #  from /Users/Development/Flutter/geulbox/ios/.symlinks/plugins/firebase_analytics/ios/firebase_analytics.podspec:3

     #  -------------------------------------------

     #  

     >  pubspec = YAML.load_file(File.ui.join('..', 'pubspec.yaml'))

     #  library_version = pubspec['version'].gsub('+', '-')

     #  -------------------------------------------

 

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/abstract_external_source.rb:175:in `rescue in store_podspec'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/abstract_external_source.rb:161:in `store_podspec'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/path_source.rb:17:in `block in fetch'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:989:in `fetch_external_source'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:968:in `block (2 levels) in fetch_external_sources'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:967:in `each'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:967:in `block in fetch_external_sources'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:966:in `fetch_external_sources'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:117:in `analyze'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'

    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'

    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'

    /usr/local/bin/pod:23:in `load'

    /usr/local/bin/pod:23:in `<main>'

 

Error output from CocoaPods:

 

    [!] Automatically assigning platform `iOS` with version `11.0` on target `Runner` because no platform was specified. Please specify a platform for this target

    in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

 

Error running pod install

Error launching application on iPhone 12 Pro Max.

 

1. 캐시된 package 재설치

flutter pub cache repair

 

2. 플러터 clean

flutter clean

 


에러 내용 2 - 카카오 flutter sdk 에러

라이브러리 버전 업데이트로 해결함

더보기

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...

Running pod install...                                              5.9s

Running Xcode build...                                                  

Xcode build done.                                            8.0s

Failed to build iOS app

Error output from Xcode build:

    ** BUILD FAILED **

 

 

Xcode's output:

    Command CompileSwift failed with a nonzero exit code

    /Users/Development/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/kakao_flutter_sdk-0.4.2/ios/Classes/SwiftKakaoFlutterSdkPlugin.swift:103:82: error:

    cannot convert value of type 'Error' to specified type 'ASWebAuthenticationSessionError.Code'

                        if case ASWebAuthenticationSessionError.Code.canceledLogin = err {

                                                                                     ^~~

    /Users/hyesun/Development/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/kakao_flutter_sdk-0.4.2/ios/Classes/SwiftKakaoFlutterSdkPlugin.swift:108:72: error:

    cannot convert value of type 'Error' to specified type 'SFAuthenticationError.Code'

                        if case SFAuthenticationError.Code.canceledLogin = err {

                                                                           ^~~

    Command MergeSwiftModule failed with a nonzero exit code

    note: Using new build system

    note: Building targets in parallel

    note: Planning build

    note: Constructing build description

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'url_launcher' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'shared_preferences' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'sign_in_with_apple' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'package_info' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'in_app_review' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'device_info' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'Flutter' from project 'Pods')

 

Could not build the application for the simulator.

Error launching application on iPhone 12 Pro Max.

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...

Running pod install...                                              5.9s

Running Xcode build...                                                  

Xcode build done.                                            8.0s

Failed to build iOS app

Error output from Xcode build:

    ** BUILD FAILED **

 

 

Xcode's output:

    Command CompileSwift failed with a nonzero exit code

    /Users/Development/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/kakao_flutter_sdk-0.4.2/ios/Classes/SwiftKakaoFlutterSdkPlugin.swift:103:82: error:

    cannot convert value of type 'Error' to specified type 'ASWebAuthenticationSessionError.Code'

                        if case ASWebAuthenticationSessionError.Code.canceledLogin = err {

                                                                                     ^~~

    /Users/hyesun/Development/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/kakao_flutter_sdk-0.4.2/ios/Classes/SwiftKakaoFlutterSdkPlugin.swift:108:72: error:

    cannot convert value of type 'Error' to specified type 'SFAuthenticationError.Code'

                        if case SFAuthenticationError.Code.canceledLogin = err {

                                                                           ^~~

    Command MergeSwiftModule failed with a nonzero exit code

    note: Using new build system

    note: Building targets in parallel

    note: Planning build

    note: Constructing build description

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'url_launcher' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'shared_preferences' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'sign_in_with_apple' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'package_info' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'in_app_review' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'device_info' from project 'Pods')

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to

    14.4.99. (in target 'Flutter' from project 'Pods')

 

Could not build the application for the simulator.

Error launching application on iPhone 12 Pro Max.

 

반응형