crazecoder / flutter_bugly

腾讯Bugly flutter应用更新统计及异常上报插件,支持Android、iOS
Other
592 stars 161 forks source link

Bugly.framework/Bugly(libBugly.a-arm64-master.o), building for iOS Simulator,bugly不能在iOS模拟器中使用吗? #128

Closed toimc closed 2 years ago

toimc commented 2 years ago
 ld: in /Users/macos/Downloads/flutter_bugly-master/example/ios/Pods/Bugly/Bugly.framework/Bugly(libBugly.a-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/macos/Downloads/flutter_bugly-master/example/ios/Pods/Bugly/Bugly.framework/Bugly'
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    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 7.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'Bugly' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)

跑的是官方的example,最新的版本,出现上面的错误。

说明:

flutter doctor -v

[✓] Flutter (Channel stable, 2.5.0, on Mac OS X 10.15.7 19H1417 darwin-x64, locale
    zh-Hans-CN)
    • Flutter version 2.5.0 at /Users/macos/Projects/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cc385b4b8 (7 周前), 2021-09-07 23:01:49 -0700
    • Engine revision f0826da7ef
    • Dart version 2.14.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/macos/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /Users/macos/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.61.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.27.0

[✓] Connected device (3 available)
    • sdk gphone x86 arm (mobile) • emulator-5554                        • android-x86    •
      Android 11 (API 30) (emulator)
    • iPhone 12 Pro Max (mobile)  • 53F48346-4308-47A7-BFC1-2838B262C382 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web)                • chrome                               • web-javascript •
      Google Chrome 94.0.4606.81

• No issues found!
crazecoder commented 2 years ago

好像是在M1上的模拟器会出现这个问题,在项目podfile添加excluded_archs解决

toimc commented 2 years ago

解决了,设置exclude arm64,即可https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-an-object-file-built-for-io

问,如何主动上传错误?DioHTTP error,没有上报

crazecoder commented 2 years ago

catch后FlutterBugly.uploadException