Bekti Bekti - 4 months ago 36
Android Question

Gradle failed to resolve library in Android Studio

I want to include a library in Android Studio , but it displays error like below :

"Failed to resolve:com.lemonlab:expandable-button-menu:1.0.0"

How to fix this problem?

apply plugin: ''

android {
compileSdkVersion 21
buildToolsVersion '21.1.2'

defaultConfig {
applicationId ""
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-ptimize.txt'), 'proguard-rules.txt'

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile ''
compile ''
compile 'com.lemonlab:expandable-button-menu:1.0.0'
compile files('libs/pinchzoom.jar')


To be able to use a lib project you need to include it in your application's settings.gradle add:

include '..:ExpandableButtonMenu:library'

and then in your build.gradle add:

compile project(':..:ExpandableButtonMenu:library') 

place ExpandableButtonMenu project along side your own (same folder)

see this How to build an android library with Android Studio and gradle? for more details.