Material-dialogs: commons:0.8.5.9 (Failed to resolve material-dialogs:core:unspecified )

Created on 14 May 2016  路  54Comments  路  Source: afollestad/material-dialogs

Hi i didn't find any issuethreads for the 0.8.5.9 version yet since you released it yesterday but i am getting the: "Failed to resolve material-dialogs:core:unspecified" in android studio everytime i include "com.afollestad.material-dialogs:commons:0.8.5.9" to dependencies. (:core works fine though)
I am using the previous version for another project and it works fine, but :commons for 0.8.5.9 isn't working.
Is it a jCenter or jitpack issue?

regards William

Most helpful comment

I have the same problems:

Error:Could not find material-dialogs:core:unspecified.
Required by:
    XXX:app:unspecified > com.afollestad.material-dialogs:commons:0.8.5.9

I think, according to @jrgonzalezg the POM file should get corrected to:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.afollestad.material-dialogs</groupId>
  <artifactId>commons</artifactId>
  <version>0.8.5.9</version>
  <packaging>aar</packaging>
  <dependencies>
    <dependency>
      <groupId>com.afollestad.material-dialogs</groupId>
      <artifactId>core</artifactId>
      <version>0.8.5.9</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>appcompat-v7</artifactId>
      <version>23.4.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>

That should do the trick...

Can you @afollestad change these two lines and update the POM on jcenter?

All 54 comments

I meet this problem too , Error:Failed to resolve: material-dialogs:core:unspecified .

The problem is in commons/build.gradle. There is a local dependency to the core project.

Michael

oh i see now. I hope that it's gonna be fixed soon. Would need that to work for my app

@MichaDo that's never been an issue before.

Using the remote version there would prevent the project from even being built locally, which prevents me from being able to publish it.

@afollestad do you have any idea why it's complaining to us?

@afollestad I need it badly. Any other way to get it. I tried some old version too but the same result.

@shabbir-dhangot did you try the 0.8.5.8 version? below 0.8.5.9 you have to include:
maven { url "https://jitpack.io" }
to the root build.gradle
and then in your app build.gradle include the dependencies:
compile('com.github.afollestad.material-dialogs:core:0.8.5.8@aar') { transitive = true } compile('com.github.afollestad.material-dialogs:commons:0.8.5.8@aar')

it works perfectly for me.

@afollestad I don't no why this works in 0.8.5.8 but not in 0.8.5.9. But :commons found no :core in local cache or not looking for. If I use both libs completely local it works fine. If I use only :commons local, :core from remote and replace compile project(':core') with compile('com.afollestad.material-dialogs:core:0.8.5.9') in build.gradle from :commons, it works also.
Maybe it helps if you have a direct referral to the local repository in :commons build.gradle:

repositories {
    mavenLocal()
}

Same issue here:

A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_googleplayDebugCompile'.
   > Could not find material-dialogs:core:unspecified.
     Searched in the following locations:
         https://jcenter.bintray.com/material-dialogs/core/unspecified/core-unspecified.pom
         https://jcenter.bintray.com/material-dialogs/core/unspecified/core-unspecified.jar
         https://jitpack.io/material-dialogs/core/unspecified/core-unspecified.pom
         https://jitpack.io/material-dialogs/core/unspecified/core-unspecified.jar
         https://maven.fabric.io/public/material-dialogs/core/unspecified/core-unspecified.pom
         https://maven.fabric.io/public/material-dialogs/core/unspecified/core-unspecified.jar
         file:/home/daniele/repository/android/android-sdk/extras/android/m2repository/material-dialogs/core/unspecified/core-unspecified.pom
         file:/home/daniele/repository/android/android-sdk/extras/android/m2repository/material-dialogs/core/unspecified/core-unspecified.jar
         file:/home/daniele/repository/android/android-sdk/extras/google/m2repository/material-dialogs/core/unspecified/core-unspecified.pom
         file:/home/daniele/repository/android/android-sdk/extras/google/m2repository/material-dialogs/core/unspecified/core-unspecified.jar
     Required by:
         androidclient:app:unspecified > com.afollestad.material-dialogs:commons:0.8.5.9

With:

dependencies {
    compile 'com.afollestad.material-dialogs:core:0.8.5.9'
    compile 'com.afollestad.material-dialogs:commons:0.8.5.9'
}

Jitpack version worked (last tried with 0.8.5.6).

Same here.

Same issue:
Error:Failed to resolve: material-dialogs:core:unspecified

The pom file seems to be being generated incorrectly: https://jcenter.bintray.com/com/afollestad/material-dialogs/commons/0.8.5.9/commons-0.8.5.9.pom with the unspecified version for core and that's why it fails or cycles when trying to resolve the dependency (depending on the task).

Same issue here

I have the same problems:

Error:Could not find material-dialogs:core:unspecified.
Required by:
    XXX:app:unspecified > com.afollestad.material-dialogs:commons:0.8.5.9

I think, according to @jrgonzalezg the POM file should get corrected to:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.afollestad.material-dialogs</groupId>
  <artifactId>commons</artifactId>
  <version>0.8.5.9</version>
  <packaging>aar</packaging>
  <dependencies>
    <dependency>
      <groupId>com.afollestad.material-dialogs</groupId>
      <artifactId>core</artifactId>
      <version>0.8.5.9</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.android.support</groupId>
      <artifactId>appcompat-v7</artifactId>
      <version>23.4.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>

That should do the trick...

Can you @afollestad change these two lines and update the POM on jcenter?

I'm also facing this issue. Any workaround for this issue?

Downgrading to 0.8.5.8 for now.

@audiultx in one of my PC 0.8.5.8 @arr not working. It always show a

Error:(21, 13) Failed to resolve: com.github.afollestad.material-dialogs:core:0.8.5.8

Can you help me with that.

@shabbir-dhangot have you added:
compile('com.github.afollestad.material-dialogs:core:0.8.5.8@aar') {
transitive = true
}

to the build.gradle in your "app" directory?
and maven {
url "https://jitpack.io"
}
to the root build.gradle in your project?
it should really work.

Yes @audiultx Its perfectly working in my PC. But when my mate importing that code in his laptop error comes. I have checked everything is proper but still not working.

@shabbir-dhangot hmm, it's hard to say what could be wrong when not having it infront of you. Except from trying to remove the dependency rebuild, then add it back and rebuild i can't give any tips unfortunately.

@audiultx actually I tried everything. I hope @afollestad solve main issue soon.

@shabbir-dhangot thats very strange, let's hope @afollestad can change the POM file like @InnoDayHackathonMasta proposed soon.

This post is for 16 days ago, any solution for this issue ?
The sad part is that downgrade to 0.8.5.8 doesn't work for me either.
Thanks :)

@marianpavel You can include core library dependency
compile 'com.afollestad.material-dialogs:core:0.8.5.9'.
Then download sources from https://github.com/afollestad/material-dialogs/releases/tag/0.8.5.9 and add commons library as a module. And in your app build.gradle include
compile project(':commons-library-module-name')

@Falcon5f I will also try that and get back with the results.

@audiultx @marianpavel Also don't forget to change commons' build.gradle:
replace
compile project(':core')
with
compile 'com.afollestad.material-dialogs:core:0.8.5.9'
(if you don't include core library as module in your project and follow my previous message)

Hello guys,
I try to integrate the core library compile 'com.afollestad.material-dialogs:core:0.8.5.9' in my application that does not work, it returns me an error like this Error:Failed to resolve: material-dialogs:core:unspecified.
However the other lib compile 'com.afollestad.material-dialogs:commons:0.8.5.9' it works well
I don't know what to do?

@Falcon5f i麓ve tried your solution now and it seams to work good, thank you very much man. Everyone here should try this solution:

  1. Download the latest project from https://github.com/afollestad/material-dialogs/releases/tag/0.8.5.9
  2. File -> New -> New module (select the commons from the material-dialogs-0.8.5.9) , give a name to it
  3. In the module you just imported, open the build.gradle
    change "compile project(...)" to compile 'com.afollestad.material-dialogs:core:0.8.5.9'
  4. In your apps build.gradle add compile project(':name-of-the-module')
  5. Run a be happy.

Thanks for your efforts @audiultx but I don't see a big deal. Here is the diff between .8 and .9:
https://github.com/afollestad/material-dialogs/compare/0.8.5.8...0.8.5.9

I think I can afford building against .8 for a few days until @afollestad fixes it :-)

@audiultx I'm glad that I could help you)

@audiultx I think this issue should stay open. Your fix is a workaround, importing MaterialDialogs directly via Maven still doesn't work, right?


EDIT: late by 10 seconds :-) thanks!

Sry i accidently closed after I wrote the last comment. Yeah it should still be open. No it still doesn't work for me.

@audiultx @daniele-athome @Falcon5f but author not trying to solve this, Might be he having some problem.

He might just be not available right now. Remember guys this is not his job probably (or he's on vacation or something).

@shabbir-dhangot today is a holiday, and I'm an employed software developer full time during the week.

Hi

I build the aar commons lib and I tested it works very well, you can download here

commons-release-0.8.5.9.zip

The problem is due to project :commons depending on :core and the build system being unable to identify the correct values of group, artifact and version of core to use when filling the commons pom.

This is currently being configured applying https://raw.githubusercontent.com/afollestad/aidanfollestad.com/master/android-release-aar.gradle at the end of core/build.gradle

If you just replace the contents of https://raw.githubusercontent.com/afollestad/aidanfollestad.com/master/android-release-aar.gradle with the contents of the attached txt (or something similar to that) it should work by re-generating the artifacts (gradle clean assemble generateRelease) and uploading the new versions to jcenter. A similar process can be applied to generate a local copy of the library with the fixed poms in a local maven repo for anyone wanting to depend on 0.8.5.9 before it gets fixed on jcenter.

android-release-aar.txt

One "easy" way for generating a working copy on the normal mavenLocal() repository on a developer machine will be to replace the last line of both core/build.gradle and commons/build.gradle with the contents of the txt in my previous comment, but replacing the uploadArchives section with:

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: mavenLocal().url)
        }
    }
}

Finally, to use it in your projects by using this method, you also need to have mavenLocal() in the repositories section of any project / module that needs to depend on this. It should then work just as if if were coming directly from a fixed version on jcenter. Also remember when declaring the dependency in your projects that the dependency group has changed in 0.8.5.9 from 'com.github.afollestad.material-dialogs' to 'com.afollestad.material-dialogs'.

@afollestad we appreciate your contribution towards the community. Please don't take it wrong.

any solution?

@ashishg656 just a workaround for now
here should try this solution:

  1. Download the latest project from https://github.com/afollestad/material-dialogs/releases/tag/0.8.5.9
  2. File -> New -> New module (select the commons from the material-dialogs-0.8.5.9) , give a name to it
  3. In the module you just imported, open the build.gradle
    change "compile project(...)" to compile 'com.afollestad.material-dialogs:core:0.8.5.9'
  4. In your apps build.gradle add compile project(':name-of-the-module')
  5. Run a be happy.

I solved it by doing this :

    compile 'com.afollestad.material-dialogs:core:0.8.5.9'
    compile ('com.afollestad.material-dialogs:commons:0.8.5.9'){
        exclude module: 'core'
    }

also add these lines to my main gradle file

allprojects {
    repositories {
        ..........
        maven { url "http://dl.bintray.com/drummer-aidan/maven" }
        maven { url "http://dl.bintray.com/drummer-aidan/maven/com/afollestad" }
    }
}

enjoy ...

@omidheshmatinia answer fix this issue. please close this issue.

It's not a fix, it's still a workaround.

i fix that problem in a pull request @daniele-athome . waiting for someone to accept&merge that

That pull request causes other issues since you will not be able to compile new versions of the library without publishing it or going back and forth with the change of that PR. The fix i proposed will work for both current and future versions without requiring any project editing for compiling on different scenarios. It will also work with normal repository declaration and normal published artifacts to jcenter.

Is there any scenario in which we have new versions that are not published ?!?! if not how do you get them ?!
Also if we want to publish a new version, It is a must to change PUBLISH_VERSION Variable, isn't it?
Both Core and Common would update parallelly and that version parameter won't hurt anyone i guess @jrgonzalezg

Of course there is @omidheshmatinia ... during development. If you are developing new features that are not yet ready it makes no sense to be publishing them to be able to test / debug them. If you raise the publish version, as you say, the build for commons and sample will fail until core is up on jcenter because before that you are depending on a yet unpublished version of core. So basically, that setup will not work well and will require either constant alternating changes on the build.gradle or publication of "debug" versions of core to test commons and sample (and waiting for it to be published too).

It seems you are right :Y
@jrgonzalezg

All that needs to happen is to change the

compile project(':core')

line should instead be

provided project(':core')

This way, the core dependency would be resolved when working on the library, but would need to be manually resolved/added by each person who uses the lib

Well, after trying out the provided solution, I take back what I said. Apparently this would work properly with pure Java libraries, but causes issues when the library is a .aar dependency

No solutions have worked so far for publishing.

@auchri @Jawnnypoo @omidheshmatinia @jrgonzalezg @daniele-athome @radityagumay @ashishg656 @vonigo @shabbir-dhangot @Falcon5f @marianpavel @AkshayChordiya @csbenz @devslava @dirkam @MichaDo @wavever

Thanks everyone, 0.8.6.0 should now resolve through jCenter correctly: https://github.com/afollestad/material-dialogs/releases/tag/0.8.6.0

You're welcome!. I am glad you accepted my proposed solution :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RezaOruji picture RezaOruji  路  3Comments

jlelse picture jlelse  路  6Comments

palaima picture palaima  路  4Comments

bernaferrari picture bernaferrari  路  5Comments

SixianOne picture SixianOne  路  5Comments