質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Flutter

Flutterは、iOSとAndroidのアプリを同じコードで開発するためのフレームワークです。オープンソースで開発言語はDart。双方のプラットフォームにおける高度な実行パフォーマンスと開発効率を提供することを目的としています。

Q&A

解決済

1回答

2868閲覧

Flutter runで起動できない

SteveO

総合スコア4

Flutter

Flutterは、iOSとAndroidのアプリを同じコードで開発するためのフレームワークです。オープンソースで開発言語はDart。双方のプラットフォームにおける高度な実行パフォーマンスと開発効率を提供することを目的としています。

0グッド

0クリップ

投稿2021/09/16 13:36

編集2021/09/17 12:52

前提・実現したいこと

flutter runできない

発生している問題・エラーメッセージ

試したこと

googleで色々と調べるとエラーコードの対応方法が載っていましたが、それに従い、
podfile、podfile.lockの削除を行い、flutter clean, flutter runを行いましたが、上記のエラーが必ず出て起動できなくなってしまいました。すみません、解決方法をお教えください。。

補足情報(FW/ツールのバージョンなど)

#####下記 iosを入れ直した後のエラー
Recreating project ....
ios/Runner.xcworkspace/contents.xcworkspacedata (created)
ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
ios/Runner/Info.plist (created)
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png (created)
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png (created)
ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (created)
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (created)
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png (created)
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png (created)
ios/Runner/Base.lproj/LaunchScreen.storyboard (created)
ios/Runner/Base.lproj/Main.storyboard (created)
ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (created)
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created)
ios/Flutter/Debug.xcconfig (created)
ios/Flutter/Release.xcconfig (created)
ios/Flutter/AppFrameworkInfo.plist (created)
ios/.gitignore (created)
ios/Runner/Runner-Bridging-Header.h (created)
ios/Runner/AppDelegate.swift (created)
ios/Runner.xcodeproj/project.pbxproj (created)
Running "flutter pub get" in app1... 986ms
Wrote 41 files.

All done!
In order to run your application, type:

$ cd .
$ flutter run

Your application code is in ./lib/main.dart.

(base) MacBook-Pro:app1 miurakoutarou$ cd .
(base) MacBook-Pro:app1 miurakoutarou$ flutter run
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install... 1,082ms
CocoaPods' output:

Preparing

Analyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Fetching external sources -> Fetching podspec for `Flutter` from `Flutter` -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios` cloud_firestore: Using Firebase SDK version '8.3.0' defined in 'firebase_core' -> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios` firebase_analytics: Using Firebase SDK version '8.3.0' defined in 'firebase_core' -> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios` firebase_auth: Using Firebase SDK version '8.3.0' defined in 'firebase_core' -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios` firebase_core: Using Firebase SDK version '8.3.0' defined in 'firebase_core' -> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios` Resolving dependencies of `Podfile` CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update [!] CocoaPods could not find compatible versions for pod "cloud_firestore": In Podfile: cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target. /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:682:in `attempt_to_activate' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in `resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run' /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:23:in `load' /usr/local/bin/pod:23:in `<main>'

Error output from CocoaPods:

[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install
Error launching application on iPhone 12 Pro Max.

##再確認後のエラー
ここより上に膨大なエラー表示があります

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 12 Pro Max.

##VScodeの実行とビルドを押した時のエラー
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
lib/main.dart:1
Xcode build done. 30.5s
Failed to build iOS app
Error output from Xcode build:

BUILD FAILED
Xcode's output:

lib/bottom/result.dart:1:8: Error: Not found: 'dart:html'
import 'dart:html';
^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7)
1 asFileUri (package:vm/kernel_front_end.dart:614:37)
2 writeDepfile (package:vm/kernel_front_end.dart:754:21)
<asynchronous suspension>
3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:570:9)
<asynchronous suspension>
4 starter (package:flutter_frontend_server/server.dart:85:12)
<asynchronous suspension>
5 main (file:///opt/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:13:24)

<asynchronous suspension> Failed to package /Users/miurakoutarou/VScode/app1. 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 Could not build the application for the simulator. Error launching application on iPhone 12 Pro Max. Exited (sigterm)

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

endiv

2021/09/17 02:01

その二行以外にも書かれている事を書いてください
SteveO

2021/09/17 02:12

ありがとうございます。不慣れで恐縮ですが、エラーコード全てを記入いたしました。よろしくお願いいたします。
guest

回答1

0

ベストアンサー

iosディレクトリが原因だと思います。
iosディレクトリを一回全部消して入れ直した方が早く治る方法だと思います。

rm -rf ios flutter create -i swift .

削除し、入れ直したら設定が何もやってない状態なので
Podfileを編集します

Podfile

1platform :ios, '10.0'//上の方にコメントアウトされているからここを10にする 2 3post_install do |installer|//下の方にあるpost_installもこれをコピって上書きする 4 installer.pods_project.targets.each do |target| 5 flutter_additional_ios_build_settings(target) 6 target.build_configurations.each do |config| 7 config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' 8 end 9 end 10end 11

投稿2021/09/17 02:16

編集2021/09/17 07:21
endiv

総合スコア161

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

SteveO

2021/09/17 05:16

上記入力しflutter run行いましたが、エラーがまだ出るようです。出たエラーをエラーコメントに反映させていただきます。
endiv

2021/09/17 07:22

回答を編集しました。 確認お願いします。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問