16
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

FlutterでAndroidビルドのみ失敗するようになる場合の対処法

Last updated at Posted at 2020-08-10

現象

Androidでデバッグビルドしてデバッグ実行していたのに、突然ビルドが出来なくなることがある。
エラーは私の場合、firebase_analytics:webの依存関係が解決できない的なメッセージ。

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':firebase_analytics:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':firebase_analytics:debugCompileClasspath'.
   > Could not resolve project :firebase_analytics_web.
     Required by:
         project :firebase_analytics
      > Unable to find a matching configuration of project :firebase_analytics_web:
          - None of the consumable configurations have attributes.

* 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

BUILD FAILED in 25s
Finished with error: Gradle task assembleDebug failed with exit code 1

環境など

ツールなど バージョンなど
MacBook Air Early2015 macOS Mojave 10.14.6
Android Studio 3.6.1
Java 1.8.0_131
Flutter 1.12.13+hotfix.9
Dart 2.7.2
Xcode 11.3.1

対処法

https://github.com/FirebaseExtended/flutterfire/issues/1615
こちらにある、flutter pub cache repairを実行して解消しました。

必ず解決できるとは限らないようですが、今のところ私は現象が発生した2回中2回とも、この方法で解消しました。

16
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?