実現したいこと
FlutterでAndroidエミュレータ向けにデバッグモードでビルドしたいのですが、エラーが出てしまいます。(エラー文は下の方に記載しています)
しかし、IOSエミュレータ向けにデバッグモードでビルドは問題なくビルドできます。
どうすればこの問題を解決することができるのでしょうか?
発生している問題・エラーメッセージ
error
1FAILURE: Build failed with an exception. 2 3* What went wrong: 4Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. 5> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'. 6 > Could not create task ':app:generateDebugLintModel'. 7 > java.lang.NullPointerException (no error message)
以下は、flutter run --verbose
で実行したときのエラー文を記載します。(長文なので上部のみ記載させていただきます)
error
1'/Users/user/.pub-cache/hosted/pub.dev/webview_flutter_android-3.7.1/android/build.gradle'. 2[ ] All projects evaluated. 3[ ] Task name matched 'assembleDebug' 4[ ] Selected primary task 'assembleDebug' from project : 5[ ] FAILURE: Build failed with an exception. 6[ +1 ms] * What went wrong: 7[ ] Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. 8[ ] > Could not resolve all dependencies for configuration ':app:debugCompileClasspath'. 9[ ] > Could not create task ':app:generateDebugLintModel'. 10[ ] > java.lang.NullPointerException (no error message) 11[ ] * Try: 12[ ] > Run with --debug option to get more log output. 13[ ] > Run with --scan to get full insights. 14[ ] * Exception is: 15[ ] org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the 16dependencies of task ':app:compileDebugJavaWithJavac'.
試したこと
flutter clean
やflutter pub cache repair
などの実行をしましたが変わりませんでした。flutter pub outdated
を実行し、とりあえず推奨されているバージョンにしてみたりしましたが変わりませんでした。
補足情報(FW/ツールのバージョンなど)
flutter
1[✓] Flutter (Channel stable, 3.10.3, on macOS 13.3.1 darwin-arm64, locale ja-JP) 2 • Flutter version 3.10.3 on channel stable at /Users/user/development/flutter 3 • Upstream repository https://github.com/flutter/flutter.git 4 • Framework revision f92f44110e (4 days ago), 2023-06-01 18:17:33 -0500 5 • Engine revision 2a3401c9bb 6 • Dart version 3.0.3 7 • DevTools version 2.23.1 8 9[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) 10 • Android SDK at /Users/user/Library/Android/sdk 11 • Platform android-33, build-tools 33.0.0 12 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java 13 • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) 14 • All Android licenses accepted. 15 16[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) 17 • Xcode at /Applications/Xcode.app/Contents/Developer 18 • Build 14E300c 19 • CocoaPods version 1.12.1 20 21[✓] Chrome - develop for the web 22 • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome 23 24[✓] Android Studio (version 2021.3) 25 • Android Studio at /Applications/Android Studio.app/Contents 26 • Flutter plugin can be installed from: 27 🔨 https://plugins.jetbrains.com/plugin/9212-flutter 28 • Dart plugin can be installed from: 29 🔨 https://plugins.jetbrains.com/plugin/6351-dart 30 • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) 31 32[✓] VS Code (version 1.73.0) 33 • VS Code at /Users/user/Downloads/Visual Studio Code.app/Contents 34 • Flutter extension version 3.60.0 35 36[✓] Connected device (3 available) 37 • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 32) (emulator) 38 • macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 darwin-arm64 39 • Chrome (web) • chrome • web-javascript • Google Chrome 40 41[✓] Network resources 42 • All expected network resources are available. 43 44• No issues found!

回答1件
あなたの回答
tips
プレビュー