【发布时间】:2022-08-19 14:41:32
【问题描述】:
我有一个可以在我的 PC 上运行的应用程序,但是当我尝试使用相同的代码在我的 Mac 上运行时,我遇到了停止运行的错误。
Error output from Xcode build:
↳
2022-07-03 23:09:28.039 xcodebuild[54309:270223] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008030-000448183438802E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f957ae1c710>
Method: -platform
Thread: <NSThread: 0x7f957a9fcf80>{number = 6, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2022-07-03 23:09:28.311 xcodebuild[54309:270230] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008030-000448183438802E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f957ae1c710>
Method: -platform
Thread: <NSThread: 0x7f9579005b50>{number = 3, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
2022-07-03 23:09:28.406 xcodebuild[54309:270230] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-18108/DTDeviceKitBase/DTDKRemoteDeviceData.m:371
Details: (null) deviceType from 00008030-000448183438802E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f957ae1c710>
Method: -platform
Thread: <NSThread: 0x7f9579005b50>{number = 3, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
Xcode\'s output:
↳
Writing result bundle at path:
/var/folders/19/zvrhzg415_b51k3jvc_vz1mr0000gn/T/flutter_tools.L5V1RD/flutter_ios_build_temp_dirZZL8EG/temporary_xcresult_bundle
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.1/lib/linear_percent_indicator.dart:162:5: Warning: The class \'WidgetsBinding\' cannot be null.
Try replacing \'?.\' with \'.\'
WidgetsBinding?.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.1/lib/linear_percent_indicator.dart:162:30: Error: Method \'addPostFrameCallback\' cannot be called on \'WidgetsBinding?\' because it is potentially null.
- \'WidgetsBinding\' is from \'package:flutter/src/widgets/binding.dart\' (\'../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart\').
Try calling using ?. instead.
WidgetsBinding?.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^^^^^^^
Failed to package /Users/XXXXX/AndroidStudioProjects/XXXX.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
Result bundle written to path:
/var/folders/19/zvrhzg415_b51k3jvc_vz1mr0000gn/T/flutter_tools.L5V1RD/flutter_ios_build_temp_dirZZL8EG/temporary_xcresult_bundle
Could not build the precompiled application for the device.
Error launching application on iPhone.
颤振酒吧缓存清理后,我有一些新问题
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode\'s output:
↳
Writing result bundle at path:
/var/folders/19/zvrhzg415_b51k3jvc_vz1mr0000gn/T/flutter_tools.lzkxYb/flutter_ios_build_temp_dir6KlO8j/temporary_xcresult_bundle
/Users/quentinguichot/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sensors_plus-1.3.2/ios/Classes/FLTSensorsPlusPlugin.m:45:24: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
void _initMotionManager() {
^
1 warning generated.
/Users/quentinguichot/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/sensors_plus-1.3.2/ios/Classes/FLTSensorsPlusPlugin.m:45:24: warning: this old-style function definition is not preceded by a prototype [-Wstrict-prototypes]
void _initMotionManager() {
^
1 warning generated.
In file included from /Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/local/leveldb_index_manager.cc:43:
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:36:11: warning: parameter \'before\' not found in the function declaration [-Wdocumentation]
* @param before - The elements that exist in the original set.
^~~~~~
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:37:11: warning: parameter \'after\' not found in the function declaration [-Wdocumentation]
* @param after - The elements to diff against the original set.
^~~~~
2 warnings generated.
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRFirestore.mm:343:20: warning: implicit conversion loses integer precision: \'NSInteger\' (aka \'long\') to \'int\' [-Wshorten-64-to-32]
max_attempts = options.maxAttempts;
~ ^~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from /Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/local/leveldb_index_manager.cc:43:
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:36:11: warning: parameter \'before\' not found in the function declaration [-Wdocumentation]
* @param before - The elements that exist in the original set.
^~~~~~
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:37:11: warning: parameter \'after\' not found in the function declaration [-Wdocumentation]
* @param after - The elements to diff against the original set.
^~~~~
2 warnings generated.
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/Source/API/FIRFirestore.mm:343:20: warning: implicit conversion loses integer precision: \'NSInteger\' (aka \'long\') to \'int\' [-Wshorten-64-to-32]
max_attempts = options.maxAttempts;
~ ^~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from /Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/local/leveldb_index_manager.cc:43:
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:36:11: warning: parameter \'before\' not found in the function declaration [-Wdocumentation]
* @param before - The elements that exist in the original set.
^~~~~~
/Users/quentinguichot/AndroidStudioProjects/ouiquit_v3/ios/Pods/FirebaseFirestore/Firestore/core/src/util/set_util.h:37:11: warning: parameter \'after\' not found in the function declaration [-Wdocumentation]
* @param after - The elements to diff against the original set.
^~~~~
2 warnings generated.
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.1/lib/linear_percent_indicator.dart:162:5: Warning: The class \'WidgetsBinding\' cannot be null.
Try replacing \'?.\' with \'.\'
WidgetsBinding?.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^
../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/percent_indicator-4.2.1/lib/linear_percent_indicator.dart:162:30: Error: Method \'addPostFrameCallback\' cannot be called on \'WidgetsBinding?\' because it is potentially null.
- \'WidgetsBinding\' is from \'package:flutter/src/widgets/binding.dart\' (\'../../Developer/flutter/packages/flutter/lib/src/widgets/binding.dart\').
Try calling using ?. instead.
WidgetsBinding?.instance.addPostFrameCallback((_) {
^^^^^^^^^^^^^^^^^^^^
Failed to package /Users/quentinguichot/AndroidStudioProjects/ouiquit_v3.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
Result bundle written to path:
/var/folders/19/zvrhzg415_b51k3jvc_vz1mr0000gn/T/flutter_tools.lzkxYb/flutter_ios_build_temp_dir6KlO8j/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 11.
标签: xcode flutter dart flutter-dependencies