Flutterで実機の導入を試みたのですが、実機で開いた時にアプリの画面が真っ白のまま動かなくなってしまったので
仕方なくSimulatorで開くことにしたのですが、ビルド時にエラーが発生しました
その後、podfileを消してみたり、いろいろしてみる内に完全にハマっっちゃいました。。
以下は、パソコンから実機の接続を切った後、Simulatorでアプリを起動してみた時の話です。
flutter doctor
[✓] Flutter (Channel beta, 1.18.0-11.1.pre, on Mac OS X 10.15.4 19E287, locale ja-JP) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 11.3.1) [✓] Android Studio (version 3.5) [✓] Connected device (1 available)
XcodeでRunしたときのエラーコードがこちらです
xcode
1'Flutter/Flutter.h' file not found
そしてこちらがAndorid Studioにて表示されたエラーです。
flutter
1Warning! The 'flutter' tool you are currently running is from a different Flutter repository than the one last used by this package. The repository from which the 'flutter' tool is currently executing will be used instead. 2 running Flutter tool: /Users/自分の名前/flutter 3 previous reference : /Users/自分の名前/AndroidStudioProjects/flutter 4This can happen when you have multiple copies of flutter installed. Please check your system path to verify that you are running the expected version (run 'flutter --version' to see which flutter is on your path). 5 6Launching lib/main.dart on AOSP on IA Emulator in debug mode... 7Running Gradle task 'assembleDebug'... 8Warning! The 'flutter' tool you are currently running is from a different Flutter repository than the one last used by this package. The repository from which the 'flutter' tool is currently executing will be used instead. 9 running Flutter tool: /Users/自分の名前/flutter 10 previous reference : /Users/自分の名前/AndroidStudioProjects/flutter 11This can happen when you have multiple copies of flutter installed. Please check your system path to verify that you are running the expected version (run 'flutter --version' to see which flutter is on your path). 12 13 14Compiler message: 15../flutter/packages/flutter/lib/src/widgets/basic.dart:5157:9: Error: Type 'ui.TextHeightBehavior' not found. 16 final ui.TextHeightBehavior textHeightBehavior; 17 ^^^^^^^^^^^^^^^^^^^^^ 18../flutter/packages/flutter/lib/src/widgets/implicit_animations.dart:1593:9: Error: Type 'ui.TextHeightBehavior' not found. 19 final ui.TextHeightBehavior textHeightBehavior; 20 ^^^^^^^^^^^^^^^^^^^^^ 21../flutter/packages/flutter/lib/src/widgets/text.dart:149:9: Error: Type 'ui.TextHeightBehavior' not found. 22 final ui.TextHeightBehavior textHeightBehavior; 23 ^^^^^^^^^^^^^^^^^^^^^ 24../flutter/packages/flutter/lib/src/widgets/text.dart:432:9: Error: Type 'ui.TextHeightBehavior' not found. 25 final ui.TextHeightBehavior textHeightBehavior; 26flutter/packages/flutter/lib/src/painting/text_style.dart:1096:7: Error: No named parameter with the name 'textHeightBehavior'. 27 textHeightBehavior: textHeightBehavior, 28 ^^^^^^^^^^^^^^^^^^ 29org-dartlang-sdk:///flutter/lib/ui/text.dart:877:3: Context: Found this candidate, but the arguments don't match. 30 ParagraphStyle({ 31 ^^^^^^^^^^^^^^ 32Target kernel_snapshot failed: Exception: Errors during snapshot creation: null 33build failed. 34 35FAILURE: Build failed with an exception. 36 37* Where: 38Script '/Users/自分の名前/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780 39 40* What went wrong: 41Execution failed for task ':app:compileFlutterBuildDebug'. 42> Process 'command '/Users/自分の名前/flutter/bin/flutter'' finished with non-zero exit value 1 43 44* Try: 45Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 46 47* Get more help at https://help.gradle.org 48 49BUILD FAILED in 29s 50Finished with error: Gradle task assembleDebug failed with exit code 1
情報の補足はいくらでもさせていただくので、回答していただけると嬉しいです!
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/06/15 09:47
2020/06/15 10:10
2020/06/15 12:11 編集
2020/06/15 12:36
2020/06/15 13:53
2020/06/15 14:14
2020/06/16 00:22
2020/06/16 09:33
2020/06/16 12:01