Flutter // 警告:使用多个匹配目标中的第一个

问题描述 投票:0回答:2

我正在使用 Flutter 开发移动应用程序。

当我在 iOS 物理设备上运行该应用程序时...我不断收到此错误,因此我无法在我的设备上运行我的应用程序。

当我在 Android 设备上运行它时没有问题,,,,,但只有 iOS 设备,,我得到这个....

我坚持了几天,我无法弄清楚。

我需要你的帮助,请帮助我。

Launching lib/main.dart on DAEGIL의 iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: T6ULPGT4J7
Xcode build done.                                            4.9s
Failed to build iOS app
Error output from Xcode build:
↳
    2021-09-27 21:19:06.855 xcodebuild[65668:3758960]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-19114/DTDeviceKitBase/DTDKRemoteDeviceData.m:373
    Details:  (null) deviceType from 00008020-0011243A2279002E was NULL when -platform called.
    Object:   <DTDKMobileDeviceToken: 0x122db7510>
    Method:   -platform
    Thread:   <NSThread: 0x15afc6f90>{number = 5, name = (null)}
    Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
    --- xcodebuild: WARNING: Using the first of multiple matching destinations:
    { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
    { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00008103-001444810A31001E }
    { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
    { platform:iOS Simulator, id:EDAD5055-209E-43BF-A48F-F0A2D8D26F43, OS:15.0, name:iPad (9th generation) }
    { platform:iOS Simulator, id:6D279D6B-91AD-43A0-ADEA-9C19BDE7F867, OS:15.0, name:iPad Air (4th generation) }
    { platform:iOS Simulator, id:CB7171EA-2225-4747-9F52-701A93AAEB11, OS:15.0, name:iPad Pro (9.7-inch) }
    { platform:iOS Simulator, id:5142D23C-2C4B-4A12-B1D7-0F50CC53106F, OS:15.0, name:iPad Pro (11-inch) (3rd generation) }
    { platform:iOS Simulator, id:3C74123E-BC00-4D28-B2F4-F76E0CACDF7C, OS:15.0, name:iPad Pro (12.9-inch) (5th generation) }
    { platform:iOS Simulator, id:FB6CB2E0-F4D7-49C9-96F5-AD4A9C5D142F, OS:15.0, name:iPad mini (6th generation) }
    { platform:iOS Simulator, id:6B2EBF24-9E52-49C1-A11E-B41DFEF488B5, OS:15.0, name:iPhone 8 }
    { platform:iOS Simulator, id:7FBEFA6E-7F73-4EDD-9ED6-E3F4ADA07594, OS:15.0, name:iPhone 8 Plus }
    { platform:iOS Simulator, id:5052D38E-6406-437B-8768-4D94AD187A7F, OS:15.0, name:iPhone 11 }
    { platform:iOS Simulator, id:02D10359-328E-4863-A07F-A5B2F3D128BE, OS:15.0, name:iPhone 11 Pro }
    { platform:iOS Simulator, id:0DD09E94-836C-445C-80FF-E3638CE49F1A, OS:15.0, name:iPhone 11 Pro Max }
    { platform:iOS Simulator, id:DCFEC142-0FD1-4796-818F-A4FA4F1A2534, OS:15.0, name:iPhone 12 }
    { platform:iOS Simulator, id:8D4C4C17-B329-4FD3-B4F2-4A5A049B7C3F, OS:15.0, name:iPhone 12 Pro }
    { platform:iOS Simulator, id:58970621-D588-4904-B2F5-79C74A9AFC2E, OS:15.0, name:iPhone 12 Pro Max }
    { platform:iOS Simulator, id:2C1D0A4C-95BE-4476-8135-5CA2AD5FF105, OS:15.0, name:iPhone 12 mini }
    { platform:iOS Simulator, id:F6FC7662-3118-485F-A613-5BF9BF50C45A, OS:15.0, name:iPhone 13 }
    { platform:iOS Simulator, id:211B26BA-8FE6-44DB-9240-052F8679C4AD, OS:15.0, name:iPhone 13 Pro }
    { platform:iOS Simulator, id:6500BCAE-6A58-4C85-B929-5AA61506EF4B, OS:15.0, name:iPhone 13 Pro Max }
    { platform:iOS Simulator, id:31F77AF0-F029-450C-82DE-36EBEA06237C, OS:15.0, name:iPhone 13 mini }
    { platform:iOS Simulator, id:777A2E59-4F4C-4016-845B-B0942CD82224, OS:15.0, name:iPhone SE (2nd generation) }
    { platform:iOS Simulator, id:986504B0-5A78-4148-8051-C0489CDAAB37, OS:15.0, name:iPod touch (7th generation) }
    ** BUILD FAILED **
Xcode's output:
↳
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in parallel
    /Users/daegilpyo/AndroidStudioProjects/tetbee/ios/Flutter/Debug.xcconfig:1:1: error: unable to open file (in target "Runner" in project "Runner")
    /Users/daegilpyo/AndroidStudioProjects/tetbee/ios/Flutter/Debug.xcconfig:1:1: error: unable to open file (in target "Runner" in project "Runner")
    /Users/daegilpyo/AndroidStudioProjects/tetbee/ios/Flutter/Debug.xcconfig:1:1: error: unable to open file (in target "Runner" in project "Runner")
    warning: Unable to read contents of XCFileList '/Target Support Files/Pods-Runner/Pods-Runner-resources-Debug-output-files.xcfilelist' (in target 'Runner' from project 'Runner')
    warning: Unable to read contents of XCFileList '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug-output-files.xcfilelist' (in target 'Runner' from project 'Runner')
    error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug-input-files.xcfilelist' (in target 'Runner' from project 'Runner')
    error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug-output-files.xcfilelist' (in target 'Runner' from project 'Runner')
    error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-resources-Debug-input-files.xcfilelist' (in target 'Runner' from project 'Runner')
    error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-resources-Debug-output-files.xcfilelist' (in target 'Runner' from project 'Runner')
Could not build the precompiled application for the device.

Error launching application on DAEGIL의 iPhone.
Exited (sigterm)

flutter -v 医生。

✓] Flutter (Channel stable, 2.2.0, on
    macOS 11.5.2 20G95 darwin-arm, locale
    en-CA)
    • Flutter version 2.2.0 at
      /Users/daegilpyo/Developer/flutter
    • Framework revision b22742018b (5
      months ago), 2021-05-14 19:12:57
      -0700
    • Engine revision a9d88a4d18
    • Dart version 2.13.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0-rc1)
    • Android SDK at /Users/daegilpyo/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0-rc1
    • Java binary at: /Applications/12.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.0, Build version 13A233
    • CocoaPods version 1.10.0

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

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/12.app/Contents
    • Flutter plugin version 47.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Connected device (2 available)
    • DAEGIL의 iPhone (mobile) • 00008020-0011243A2279002E • ios            • iOS 14.7.1
    • Chrome (web)            • chrome                    • web-javascript • Google Chrome 94.0.4606.61

• No issues found!
ios flutter
2个回答
0
投票

尝试一下

terminal

 1. sudo gem update cocoapods --pre
 2. pod update

并且在

Xcode

 3. clean
 4. build

如果无法修复,请尝试更改步骤 2,如

  • 删除
    Pod
    文件夹和
    Podfile.lock
  • cd
    到项目目录,然后运行
    pod install

我之前尝试过它的工作原理,我不确定它是否适合你的情况

我找到了另一种方法:

  1. 删除
    Pods
    整个文件夹、
    Podfile.lock
    和另外一个文件
    $project.xcworkspace
  2. 奔跑
    pod deintegrate
  3. 奔跑
    pod install

0
投票

我已经奋斗了一个星期,尝试了 Stack Overflow 上写的所有内容,但总是失败。我删除了 Xcode 应用程序并重新创建了它,我的项目成功了。

© www.soinside.com 2019 - 2024. All rights reserved.