Reputation: 2995
So, i got this error as
Error:Failed to resolve: Android-Iconics:library-core:unspecified
in my Android Studio 2.1 Preview 3 after i tried to compile
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1'
I have tried many other options but failed to compile it in any way. I have also added iconic library but still it gives me same error. So, can anyone help me out with this ?
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.0 rc2"
defaultConfig {
applicationId ""
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
mavenCentral()
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.google.code.gson:gson:2.6.2'
compile('com.mikepenz:materialdrawer:5.1.5@aar') {
transitive = true
}
compile 'com.mikepenz:iconics-core:2.5.10@aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar'
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1'
}
Upvotes: 2
Views: 2609
Reputation: 2995
Although i did solve this problem many days ago but i do still want to answer it.
Answer by Jaldeep Asodariya is correct.
compile('com.mikepenz:materialdrawer:5.2.0@aar') {
transitive = true
}
Now here we have two option:
@aar
at the end library and do not add transitive = false
, just don't add anything, it will work. If you do not add anything then Transitive is true by default.true
. If it is false then it will show this error.It's like whenever we fetch library @aar
then transitive should be true in most of cases.Besides other than that, you can always check the github's error wikis of library.
Upvotes: 1
Reputation: 280
i have faced some problem, but the solution is add "@aar" after version name of library. like below...
compile 'com.mikepenz:fontawesome-typeface:4.6.0.1@aar'
Full dependencies code
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile('com.mikepenz:materialdrawer:5.2.0@aar') {
transitive = true
}
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mikepenz:iconics-core:2.5.11@aar'
compile 'com.mikepenz:fontawesome-typeface:4.6.0.1@aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar'
}
This was worked for me and Gradle sync successfully with out error. Thanks.
Upvotes: 4