為什麼我可以通過 android 模擬器運行一個簡單的計數器應用程序,但不能通過 ios 模擬器運行? (Why can I run a simple counter application through an android simulator but not through an ios simulator?)


問題描述

為什麼我可以通過 android 模擬器運行一個簡單的計數器應用程序,但不能通過 ios 模擬器運行? (Why can I run a simple counter application through an android simulator but not through an ios simulator?)

我正在嘗試運行一個在 android 模擬器和 ios 模擬器上創建計數器的示例應用程序。android模擬器是通過android studio創建的,ios模擬器是通過xcode創建的。該應用程序在 android 模擬器上運行良好,但在執行相同步驟時在 ios 模擬器上運行良好。關於如何解決這個問題的任何想法?

這就是返回:

Launching lib/main.dart on iPhone 11 in debug mode...
Running Xcode build...
Xcode build done.                                           10.8s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode 的輸出:

↳
    ld: framework not found Flutter
    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: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')

Could not build the application for the simulator.
Error launching application on iPhone 11.

參考解法

方法 1:

Type in your shell open ios/Runner.xcodeproj the on XCode go to Runner ‑> Targets Runner ‑> All And check you have a Team selected and also if it's a physical device you granted the permission on the iPhone.

Steps: https://i.stack.imgur.com/Qeh7p.png

(by jasltngSantiago M)

參考文件

  1. Why can I run a simple counter application through an android simulator but not through an ios simulator? (CC BY‑SA 2.5/3.0/4.0)

#android-studio #Flutter






相關問題

Android Studio ADB 沒有響應 (Android Studio ADB not responding)

安卓工作室。錯誤:(19,0) (Android Studio. Error:(19,0))

如果編輯除 build.gradle 之外的其他 gradle 文件,Android Studio gradle 不會同步 (Android Studio gradle doesn't sync if edit other gradle files except build.gradle)

從Android應用程序中的較大圖片中提取和使用圖像縮略圖 (Extracting and using Image Thumbnail from larger picture in android app)

Android graphview x值低於以前的值 (Android graphview x values lower than previous values)

使用 android studio 在 webview 中顯示谷歌表單 (display google forms in webview using android studio)

默認工具欄和狀態欄未顯示在 android studio 3.3 中的 xml 預覽中 (Default toolbar and status bar not showing into xml preview in android studio 3.3)

我在 google play 上發布的應用程序在用戶下載時會顯示一個 android 文件。我怎樣才能解決這個問題? (My published app on google play shows an android file when users download it. How can i fix this?)

Android studio gradle home 路徑 (Android studio gradle home path)

將數組從 android 發佈到 Google 應用程序腳本 (POSTing a array from android to Google apps script)

為什麼我可以通過 android 模擬器運行一個簡單的計數器應用程序,但不能通過 ios 模擬器運行? (Why can I run a simple counter application through an android simulator but not through an ios simulator?)

RecycleView 第一次工作正常,下次什麼都沒有? (RecycleView works fine for the first time ,next time it shows nothing?)







留言討論