質問
Flutterでアプリ開発中に下記のエラーが出てエミュレータが立ち上がらなくなりました。
エラーコードは下記になります。
バージョン
Flutter 1.22.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7891006299 (5 weeks ago) • 2020-12-10 11:54:40 -0800
Engine • revision ae90085a84
Tools • Dart 2.10.4
VS Code
発生している問題・エラーメッセージ
FAILURE: Build completed with 2 failures. 1: Task failed with an exception. ----------- * Where: Build file '/Users/00/develop/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_analytics-6.3.0/android/build.gradle' line: 26 * What went wrong: A problem occurred evaluating root project 'firebase_analytics'. > Could not find the firebase_core FlutterFire plugin, have you added it as a dependency in your pubspec? * Try: Run 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. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: A problem occurred configuring root project 'firebase_analytics'. > compileSdkVersion is not specified. * Try: Run 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. ============================================================================== * Get more help at https://help.gradle.org
↑上記で出ているfirebaseですが、pubspec.ymlには記載しており、これまでは問題なく動いておりました。
試したこと
flutter doctor --version
では問題は検知されませんでした。
-> % flutter doctor -v [✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale ja-JP) • Flutter version 1.22.5 at /Users//develop/flutter • Framework revision 7891006299 (5 weeks ago), 2020-12-10 11:54:40 -0800 • Engine revision ae90085a84 • Dart version 2.10.4 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users//Library/Android/sdk • Platform android-30, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.3) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.3, Build version 12C33 • CocoaPods version 1.10.0 [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 50.0.1 • Dart plugin version 193.7547 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.52.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.18.1 [✓] Connected device (1 available) • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
flutter clean rm -rf .pub-cache rm -rf /Users/〇〇/develop/flutter/bin/cache
などでキャッシュを削除したり,Andoroid Studioで試してみましたが起動成功しません。
何か少しでもお分かりの方がいらっしゃればご教示いただきたいです。何卒宜しくお願い致します。
回答1件
あなたの回答
tips
プレビュー