Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error:Failed to resolve: Android-Iconics:iconics-core:unspecified #574

Closed
bzkdjc opened this issue Aug 22, 2015 · 45 comments
Closed

Error:Failed to resolve: Android-Iconics:iconics-core:unspecified #574

bzkdjc opened this issue Aug 22, 2015 · 45 comments
Assignees
Labels

Comments

@bzkdjc
Copy link

bzkdjc commented Aug 22, 2015

Since I reconfigured my code to use v4.0.0, Android Studio does not compile! Anything I try fails with that message:

Error:Failed to resolve: Android-Iconics:iconics-core:unspecified

Even when I try to clean the project I get:

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not find Android-Iconics:iconics-core:unspecified.
     Searched in the following locations:
         https://jcenter.bintray.com/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         https://jcenter.bintray.com/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
         file:/home/dan/DevAndroid/sdk/extras/android/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         file:/home/dan/DevAndroid/sdk/extras/android/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
         file:/home/dan/DevAndroid/sdk/extras/google/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         file:/home/dan/DevAndroid/sdk/extras/google/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
     Required by:
         CollecteRecouris:app:unspecified > com.mikepenz:fontawesome-typeface:4.4.0.1

This never happened before when using v3. But, I already updated all my code to use v4, today!
This is what's included in app's build.gradle:

  compile 'com.mikepenz:materialdrawer:4.0.0'
  compile 'com.mikepenz:iconics-core:1.7.3'
  compile 'com.mikepenz:fontawesome-typeface:4.4.0.1'
@mikepenz
Copy link
Owner

Can you try to add mavenCentral() as dependency repository?

@mikepenz mikepenz self-assigned this Aug 22, 2015
@bzkdjc
Copy link
Author

bzkdjc commented Aug 22, 2015

Added mavenCentral() to app's build.gradle (not the project's build.gradle) with these lines:

repositories {
  mavenCentral()
}

But, error remains the same!

Added mavenCentral() to project's build.gradle (not the app's build.gradle) with these lines:

repositories {
  jcenter()
  mavenCentral()
}

Still the same error is showing and blocking!!

@bzkdjc
Copy link
Author

bzkdjc commented Aug 22, 2015

Is there another way to add mavenCentral() as dependency?

@mikepenz
Copy link
Owner

And you updated to the latest v23 build tools and target sdk version and 1.3 gradle build tools?

@bzkdjc
Copy link
Author

bzkdjc commented Aug 22, 2015

Yes!

apply plugin: 'com.android.application'

android {
  compileSdkVersion 23
  buildToolsVersion "23.0.0"

  defaultConfig {
    applicationId "com.veryexample.appmaterial"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 3
    versionName "3.0"
  }
  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

repositories {
  mavenCentral()
}

dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  compile 'com.android.support:appcompat-v7:23.0.0'
  compile 'com.mikepenz:materialdrawer:4.0.0'
  compile 'com.mikepenz:iconics-core:1.7.3'
  compile 'com.mikepenz:fontawesome-typeface:4.4.0.1'
}

@bzkdjc
Copy link
Author

bzkdjc commented Aug 22, 2015

Using Android Studio 1.3.2.
This is project's build.gradle:

buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:1.3.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
}

allprojects {
  repositories {
    jcenter()
  }
}

Was using MaterialDrawer with the same configuration without problem before moving to 4.0.0.

@bzkdjc
Copy link
Author

bzkdjc commented Aug 22, 2015

Just tried a Run>Rebuild from Android Studio menu and got again:

Error:Failed to resolve: Android-Iconics:iconics-core:unspecified

@mikepenz
Copy link
Owner

Hmmm really strange. A similar configuration is working for me on multiple projects. Also for some friends.

I'm currently on vacation until tomorrow. Will take a closer look then

@bzkdjc
Copy link
Author

bzkdjc commented Aug 22, 2015

Meanwhile, here is a screenshot.
selection_126

@bzkdjc
Copy link
Author

bzkdjc commented Aug 22, 2015

Found that this only happens when I add

compile 'com.mikepenz:fontawesome-typeface:4.4.0.1'

to app's build.gradle.

When this line is removed from build.gradle:

  compile fileTree(include: ['*.jar'], dir: 'libs')
  compile 'com.android.support:appcompat-v7:23.0.0'
  compile 'com.mikepenz:materialdrawer:4.0.0'
  compile 'com.mikepenz:iconics-core:1.7.3'

then compilation succeeds and whole build is successful!
But FontAwesome seems missing.

@mikepenz
Copy link
Owner

If you only have mavenCentral or mavenCentral. before jCenter?

@bzkdjc
Copy link
Author

bzkdjc commented Aug 22, 2015

Changed my project's build.gradle to this:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
  repositories {
    mavenCentral()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:1.3.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
}

allprojects {
  repositories {
    mavenCentral()
  }
}

and did a clean/build, but still got:

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not find Android-Iconics:iconics-core:unspecified.
     Searched in the following locations:
         https://repo1.maven.org/maven2/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         https://repo1.maven.org/maven2/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
         file:/home/dan/DevAndroid/sdk/extras/android/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         file:/home/dan/DevAndroid/sdk/extras/android/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
         file:/home/dan/DevAndroid/sdk/extras/google/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         file:/home/dan/DevAndroid/sdk/extras/google/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
     Required by:
         CR (version with mikepenz-MaterialDrawer):app:unspecified > com.mikepenz:fontawesome-typeface:4.4.0.1

selection_127

@mikepenz
Copy link
Owner

@bzkdjc can you try to add the materialdrawer dependenc with the transitive part?

compile('com.mikepenz:materialdrawer:4.0.0@aar') {
    transitive = true
}

and remove the iconics-core dependency (this is already part of the materialdrawer)
and then also add the font dependency?

@bzkdjc
Copy link
Author

bzkdjc commented Aug 24, 2015

This is my build.gradle now:

dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  compile 'com.android.support:appcompat-v7:23.0.0'
  compile('com.mikepenz:materialdrawer:4.0.0@aar') {
    transitive = true
  }
  compile 'com.mikepenz:fontawesome-typeface:4.4.0.1'
...

I get that exact same error:

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not find Android-Iconics:iconics-core:unspecified.
     Searched in the following locations:
         https://repo1.maven.org/maven2/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         https://repo1.maven.org/maven2/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
         file:/home/dan/DevAndroid/sdk/extras/android/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         file:/home/dan/DevAndroid/sdk/extras/android/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
         file:/home/dan/DevAndroid/sdk/extras/google/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.pom
         file:/home/dan/DevAndroid/sdk/extras/google/m2repository/Android-Iconics/iconics-core/unspecified/iconics-core-unspecified.jar
     Required by:
         CR (version with mikepenz-MaterialDrawer):app:unspecified > com.mikepenz:fontawesome-typeface:4.4.0.1

Did you say to also remove the fontawesome dependency? I read "also add the font dependency." The problem may come from that fontawesome dependency.

@bzkdjc
Copy link
Author

bzkdjc commented Aug 24, 2015

selection_128

@bzkdjc
Copy link
Author

bzkdjc commented Aug 24, 2015

The whole build.gradle:

apply plugin: 'com.android.application'

android {
  compileSdkVersion 23
  buildToolsVersion "23.0.0"

  defaultConfig {
    applicationId "com.veryexample.cr"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 3
    versionName "3.0"
  }
  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  compile 'com.android.support:appcompat-v7:23.0.0'
  compile('com.mikepenz:materialdrawer:4.0.0@aar') {
    transitive = true
  }
  compile 'com.mikepenz:fontawesome-typeface:4.4.0.1'
  compile project(':imageResizer')
  compile 'com.github.gabrielemariotti.cards:cardslib-core:2.1.0'
  compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.1.0'
  compile 'com.squareup.picasso:picasso:2.5.2'
  compile 'com.snappydb:snappydb-lib:0.5.2'
  compile 'com.esotericsoftware.kryo:kryo:2.24.0'
  compile 'com.github.lawloretienne:trestle:0.0.2'
}

@mikepenz
Copy link
Owner

@bzkdjc i am still not sure why your gradle can't resolve it, as it is working for everyone else. If you run the sample application (of the MaterialDrawer, just download the repo and start the sample) will it also show the same exception?

@mikepenz
Copy link
Owner

@bzkdjc can you please zip and send me the small sample app you've created. i hope it will also fail with the same exception on my system.

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

Removing extra code and zipping...
Done!

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

Just zipped and 'email'ed.

@mikepenz
Copy link
Owner

@bzkdjc do you want to know something. it showed the same issue for me.

after that i added

    compile 'com.mikepenz:google-material-typeface:1.2.0.1@aar'

in addition to

    compile 'com.mikepenz:fontawesome-typeface:4.4.0.1@aar'

and it worked.

So i removed

    compile 'com.mikepenz:google-material-typeface:1.2.0.1@aar'

again. but it still works. do not ask my what gradle does here, or why it has troubles first and then it doesn't but yeah.

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

So... I'm going to try to add google-material-typeface and then removed it.
Trying...

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

Added google-material-typeface like this:

dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  compile 'com.android.support:appcompat-v7:23.0.0'
  compile('com.mikepenz:materialdrawer:4.0.0@aar') {
    transitive = true
  }
  compile 'com.mikepenz:google-material-typeface:1.2.0.1'
  compile 'com.mikepenz:fontawesome-typeface:4.4.0.1'
}

But here, still shows that exact same issue!
Maybe should I change to v4.0.1??...

@mikepenz
Copy link
Owner

@bzkdjc here is the one which is working on my machine now: https://docs.google.com/uc?id=0B4Y8HN2BnSjpc182bk1uQjBxMFk&export=download

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

Going to try that...

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

Hoping that this will not be cause of trouble here:
sync android sdks_129

@mikepenz
Copy link
Owner

@bzkdjc no. just a different path of my sdk. it's ok

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

Yes!
That version does compile successfully :)

@mikepenz
Copy link
Owner

@bzkdjc you can check. no differences in the gradle. right?

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

Yes! Then, what's up with previous version??

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

And can I move to your latest 4.0.1??

@mikepenz
Copy link
Owner

@bzkdjc yes you can update to the latest.

i still do not know why it is / was not compiling for you

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

FontAwesome now appears OK.
Just move to v4.0.1 OK.
Now all's good!

@bzkdjc
Copy link
Author

bzkdjc commented Aug 25, 2015

Thank you very much for your time :)

@bzkdjc bzkdjc closed this as completed Aug 25, 2015
@mikepenz
Copy link
Owner

@bzkdjc thank you so much that you did not go crazy :D and sorry for the issues. and sorry that i still do not really know what'S the problem :O

@mikepenz
Copy link
Owner

@bzkdjc found the issues. and now i know why it only happens for some people.

The difference between my gradle and dependencies and yours is that i always add @aar for Android libs. This (i believe) tells gradle to handle the dependency a bit different. (if i'm correct it sets transitive: false in the background) (so it is working for most people as it is also written with @aar in the readme)

So you now have to options. either you add @aar add the end of the typeface dependencies like this:

compile('com.mikepenz:google-material-typeface:1.2.0.1@aar')
compile('com.mikepenz:fontawesome-typeface:4.4.0.1@aar')

or you add transitive: false like in this sample:

compile('com.mikepenz:google-material-typeface:1.2.0.1') {
        transitive = false
}
compile('com.mikepenz:fontawesome-typeface:4.4.0.1') {
        transitive = false
}

@alejandroluengo
Copy link

Sorry to say exact issue for me, just tried every combination on this topic with no luck

@mikepenz
Copy link
Owner

@alejandroluengo you also haven mavenCentral()?

@hectorggp
Copy link

Hi @mikepenz. Sorry, I have exactly the same problem here. Have you found the source of the problem? I shared a screenshot. Regards!
captura de pantalla 2016-09-19 a las 12 45 02 pm

@mikepenz
Copy link
Owner

@hectorggp is your gradle in offline mode? as of the log it does not search on mavenCentral nor in jCenter

@hectorggp
Copy link

no, not in offline mode according to preferences> build, execution,
deployment> Build tools> Gradle

2016-09-19 11:45 GMT-07:00 Mike Penz notifications@github.com:

@hectorggp https://github.com/hectorggp is your gradle in offline mode?
as of the log it does not search on mavenCentral nor in jCenter


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#574 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADQ-kw5icesSc2xJZYdl4beV8_86yp3mks5qrthlgaJpZM4FwWvc
.

Héctor G. Gatica Paz -- Cel. (502) 5558 9832

@mikepenz
Copy link
Owner

@hectorggp but your gradle output shows that it is not searching online

@hectorggp
Copy link

Yes, but I have not selected this option. Surely it is Gradle problem. I'll
check this. Thank you

2016-09-19 11:51 GMT-07:00 Mike Penz notifications@github.com:

@hectorggp https://github.com/hectorggp but your gradle output shows
that it is not searching online


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#574 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADQ-k9FTIlzxGpGk7tmp7_gvv5bUkpWjks5qrtm9gaJpZM4FwWvc
.

Héctor G. Gatica Paz -- Cel. (502) 5558 9832

@mikepenz
Copy link
Owner

@hectorggp ok great

@Aecttann
Copy link

Aecttann commented Jun 1, 2017

I've found one more simple issue for resolving problem with FontAwesome importing. Yes, not compiling but importing. I was using old version (com.mikepenz.materialdrawer:library:0.9.5@aar), and when i was update it to 5.9.2, i've got problem with FontAwesome class. Nothing helped me, but.
When i have delete import of FontAwesome in my class it automatically imports new one. There is another path to this class.
Hope this will help somebody :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants