1

When using the Firebase plugins and starting an Android build, I get the following error:

ERROR: Failed to resolve: com.google.firebase:firebase-core:
Affected Modules: app, firebase_core.

It works fine on iOS.

FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not find com.google.firebase:firebase-core:.
     Required by:
         project :app
         project :app > project :firebase_core

2 Answers 2

3

This issue was fixed in the 0.3.4 update of firebase_core, which is a dependency of other Flutter Firebase plugins. You should be able to get the fix with a "flutter packages upgrade".

https://github.com/flutter/plugins/pull/1464/files

2

This is an issue that occurs because FlutterFire is migrating to BoM.
To solve this issue for now, you should just use firebase_core: 0.3.1+1.

The ideal solution would be adding the following to your settings.gradle in your android module:

enableFeaturePreview('IMPROVED_POM_SUPPORT')

However, this might not work. In that case, you should revert to 0.3.1+1 for the moment.

You can find out more about it here.

1
  • You save my day. Thank you very much. Commented Apr 7, 2019 at 13:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.