flexbox-layout icon indicating copy to clipboard operation
flexbox-layout copied to clipboard

Dependency not resolved by default

Open milosmns opened this issue 7 years ago • 18 comments

  • [ ✅] There is a similar issue, but not the same. I have searched existing issues and confirmed this is not a duplicate.

Problem

With Gradle, 'com.google.android:flexbox' artifact is not available in default jCenter repo, and also not available in MavenCentral. The error is "Failed to resolve artifact". I checked the URLs that Gradle tries to resolve, and it's looking for the lib in jcenter.bintray.com, but the code is actually at google.bintray.com as found through your 'download' badge -- which is (I believe) the reason that causes the issue.

How to reproduce it?

Create a new empty project in Android Studio and try to add this dependency. It can be an empty project. Use Android Studio 3.0 or later. I don't know which plugins you have for project creation, but it's extremely important not to add any Google-specific dependencies, as everyone outside of Google would not have them included by default. Having a Google repository pre-included is probably the reason why it's working for you and other people are complaining about not resolving the artifact (as in this issue and this one).

Version of the flexbox library

1.0.0 and 1.1.0

Preferred resolution

Looks like we need to add a Google jCenter repo somehow, can you tell us how? Or can you publicly include this in jCenter index? There is a button to do so after you publish a lib to your local repo inside of jCenter. Flexbox is not even visible by search in jCenter or MavenCental index pages, so please also check why that is the case.

milosmns avatar Dec 10 '18 14:12 milosmns

Oh, and yes, I do have google(), jCenter() and mavenCentral() dependency repositories included for all modules, of course.

milosmns avatar Dec 10 '18 14:12 milosmns

I have the exact same issue with version 0.2.5, It seems that artifacts con jcenter are down at the moment, on Friday it was working as expected

mvignale1987 avatar Dec 10 '18 14:12 mvignale1987

Interesting! But it's somehow hidden in search too... 🤔🤔

On Mon, Dec 10, 2018, 15:31 Mauricio Vignale [email protected] wrote:

I have the exact same issue with version 0.2.5, It seems that artifacts con jcenter are down at the moment, on Friday it was working as expected

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/flexbox-layout/issues/475#issuecomment-445835003, or mute the thread https://github.com/notifications/unsubscribe-auth/ABsJitKKNIDQJqBk6ElwKXymo9CBHOL2ks5u3nA8gaJpZM4ZLcjM .

milosmns avatar Dec 10 '18 14:12 milosmns

I have the same problem with the provided versions for those who do not use androidx

allefsousa avatar Dec 10 '18 14:12 allefsousa

0.3.0 is not working for us either

DanielJette avatar Dec 10 '18 14:12 DanielJette

Hello. I'm using version 0.3.2 as a dependency, and currently, my build fails.

sooshee94 avatar Dec 10 '18 15:12 sooshee94

Same issue here. It looks like the library vanished from the repository 🤔

In the meantime you can add this repository as a workaround:

maven {
    url "https://google.bintray.com/flexbox-layout"
}

maclir avatar Dec 10 '18 15:12 maclir

Anyone experiencing this on other dependencies ? I've been hitting this issue without various artifacts today ! (google-services, flexbox, firebase).. Wondering what's happening with google(), jCenter() and mavenCentral()

julienR2 avatar Dec 10 '18 17:12 julienR2

@julienR2 Yes! Though flexbox is the only one so far with a concrete solution for it.

fergusonm avatar Dec 10 '18 17:12 fergusonm

Anyone experiencing this on other dependencies ? I've been hitting this issue without various artifacts today ! (google-services, flexbox, firebase).. Wondering what's happening with google(), jCenter() and mavenCentral()

I'm having with all the dependencies you mentioned too, with no success with my builds until now.

silviorp avatar Dec 10 '18 17:12 silviorp

Does anybody have something from Google about this problem? I'm having the same problem with a lot of Google libraries.

silviorp avatar Dec 10 '18 19:12 silviorp

@shrpereira Best I have is this one: https://issuetracker.google.com/issues/120759347

simtel12 avatar Dec 10 '18 20:12 simtel12

Yeah this is a huge blocker - a few new devs joined the team and none can perform their first builds.

KgotsoK avatar Dec 11 '18 10:12 KgotsoK

We apologize for what happened here : its back available here https://jcenter.bintray.com/com/google/android/flexbox/, you no longer need the workaround.

https://issuetracker.google.com/issues/120759347#comment97 : Please let us know if you run into any more issues.

jabubake avatar Dec 12 '18 05:12 jabubake

Here's the public link to the comment from @jabubake https://issuetracker.google.com/issues/120759347#comment97 ;)

MGaetan89 avatar Dec 12 '18 06:12 MGaetan89

Apologies for the inconvenience.

The root issue has been resolved. Please reopen the issue if it still persists.

thagikura avatar Dec 14 '18 07:12 thagikura

Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not resolve com.google.android:flexbox:1.0.0. Required by: project :app > com.salesforce.service:servicesdk:224.0.1 > com.salesforce.service:chat-ui:4.1.2 When building with the latest gradle, and needing to remove jcenter()

Anyone else finding the same from saleforce?

GordonBerrington avatar Sep 13 '21 09:09 GordonBerrington

Yes, this issue creeped back through the sales force chat-ui library. I experience the exact same error as @GordonBerrington . So @thagikura how are we supposed to solve this problem in this case? Do you have any recommendations when the removed dependency is referenced in some library out of our control?

zergeborg avatar Nov 16 '21 14:11 zergeborg