Coder Social home page Coder Social logo

Build error about snippets-android HOT 11 CLOSED

firebase avatar firebase commented on August 12, 2024
Build error

from snippets-android.

Comments (11)

thatfiredev avatar thatfiredev commented on August 12, 2024 2

Hey guys, I've cloned the project and ran into the same issue. There seems to be some kind of conflict with the firebase-iid dependency on some modules.

I've edited the settings.gradle (root) commenting out ':predictions:app' and ':perf:app' and the build runs successfully.

If I comment out the predictions module only, the conflict persists, but now in the dynamic-links and invites modules:

Execution failed for task ':invites:app:androidDependencies'.

Failed to notify dependency resolution listener.
The library com.google.firebase:firebase-iid is being requested by various other libraries at [[17.0.0,17.0.0]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

Execution failed for task ':dynamic-links:app:androidDependencies'.

Failed to notify dependency resolution listener.
The library com.google.firebase:firebase-iid is being requested by various other libraries at [[17.0.0,17.0.0]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

The predictions and perf modules have the firebase-config:16.0.0 dependency in common, while the invites and dynamic-links modules have the firebase-invites:16.0.3 dependency in common. Maybe one (or both) of those libraries have an internal dependency on an older version of firebase-iid?

Also: Running the clean task doesn't show any build error, but android studio keeps the warning. This might be the reason why the automatic build on travis-ci doesn't fail.

But even with the studio warning, I can edit the snippets normally. @the-dagger

Update: I've updated google-services and changed the order of some gradle files (as suggested here), it solved the problem. I'll send a PR.

Update 2: After trying a second build, I noticed that changing the order of dependencies didn't fix the problem. So I removed the line apply plugin: 'com.google.gms.google-services' from the perf and instance-id modules. It now builds successfully.

PS: I think it is also worth pointing out I deleted my gradle cache (as instructed here) after changing the order of dependencies.

from snippets-android.

samtstern avatar samtstern commented on August 12, 2024 2

Haha all hail @dpebot !

from snippets-android.

the-dagger avatar the-dagger commented on August 12, 2024 1

@rosariopfernandes Nope, the build still errors out.
Moving google() to first place in repositories block fixes the error where play-services aar was not found but the issue with dependency resolution listener still persists.

FAILURE: Build failed with an exception.

* What went wrong:
Failed to notify dependency resolution listener.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-analytics-impl is being requested by various other libraries at [[15.0.2,15.0.2]], but resolves to 16.1.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

* 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

from snippets-android.

the-dagger avatar the-dagger commented on August 12, 2024 1

The latest commit seems to have fixed the build errors now.
Thanks @dpebot ❤️😆

from snippets-android.

samtstern avatar samtstern commented on August 12, 2024

@the-dagger what are you running to get that error? Or is Android Studio just spewing it at you when you load the project?

from snippets-android.

the-dagger avatar the-dagger commented on August 12, 2024

@samtstern Studio is giving me this error after loading the project and downloading the dependencies.

from snippets-android.

samtstern avatar samtstern commented on August 12, 2024

Huh ok ... well it's definitely a bug but first I need to figure out why I can't reproduce it.

I am able to run ./gradlew assemble just fine at the command line. Are you?

from snippets-android.

the-dagger avatar the-dagger commented on August 12, 2024

Unfortunately that task failed on my end.
Here's a detailed stacktrace if that helps.

https://pastebin.com/p8n8iCzK

P.S. I saw some complains regarding missing dependency for firebase-core.

from snippets-android.

the-dagger avatar the-dagger commented on August 12, 2024

That's helpful, thanks a ton @rosariopfernandes I'll give this a shot.

from snippets-android.

the-dagger avatar the-dagger commented on August 12, 2024

@rosariopfernandes Just tried the changes you suggested, still doesn't build for me.

So I removed the line apply plugin: 'com.google.gms.google-services' from the perf and instance-id modules. It now builds successfully.

P.S. I tried the changes outlined in your PR as well #42, still no luck.

Also yes, the build command works just fine, but the moment you try build command, it brings up the issue again.

from snippets-android.

thatfiredev avatar thatfiredev commented on August 12, 2024

Did you try clearing/invalidating your cache?

from snippets-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.