当我为通用设备构建或为真实设备运行时,它会在 xcode 上出现以下错误
ld: warning: Could not find auto-linked framework 'Flutter' Undefined symbols for architecture armv7: "_FlutterMethodNotImplemented", referenced from:
-[FLTDeviceInfoPlugin handleMethodCall:result:] in DeviceInfoPlugin.o "_OBJC_CLASS_$_FlutterMethodChannel", referenced from:
objc-class-ref in DeviceInfoPlugin.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)
并且 flutter build 命令运行没有错误
扑医生:
121:flutter_module sumeetjain$ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [?] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G95, locale en-IN) [?] Android toolchain - develop for Android devices
? Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/setup/#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[?] Xcode - develop for iOS and macOS (Xcode 10.3) [!] Android Studio (not installed) [?] Connected device (2 available)
! Doctor found issues in 2 categories.
Run Code Online (Sandbox Code Playgroud)
但是当我将频道更改为 master 时,错误不会出现。因为我想发布我的应用程序,所以我不能在主频道上这样做对吧!
主通道颤振博士
[?] Flutter (Channel master, v1.10.3-pre.70, on Mac OS X 10.14.6 18G95, locale en-IN)
[?] Android toolchain - develop for Android devices
? Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/setup/#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[?] Xcode - develop for iOS and macOS (Xcode 10.3)
[!] Android Studio (not installed)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
Run Code Online (Sandbox Code Playgroud)