Android Studio Failed to resolve:com.github.PhilJay:MPAndroidChart:v2.1.3

两盒软妹~` 提交于 2019-12-12 04:25:58

问题


Hi all i am using charts library in my project a month ago it was working fine but now i have reinstalled android studio and when i build my project it gives gradle sync error.

Failed to resolve:com.github.PhilJay:MPAndroidChart:v2.1.3

I am stuck on this any suggestions how to solve this.My android studio version is 2.1

Here is project dependencies

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '23.0.2'

    defaultConfig {
        applicationId "com.app.comismv"
        minSdkVersion 14
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    maven {
        jcenter()
        url "https://jitpack.io"
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.github.PhilJay:MPAndroidChart:v2.1.3'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
    //compile 'com.cardiomood.android:android-widgets:0.1.1'
}

Thanks in advance


回答1:


I had the same problem, here is the latest version of MPAndroidChart-v2.2.5.jar jar file.

Just put the MPAndroidChart-v2.2.5.jar inside app/libs/

and add

dependencies {
    .
    .
    compile files('libs/MPAndroidChart-v2.2.5.jar')
} 

in gradle file



来源:https://stackoverflow.com/questions/39250493/android-studio-failed-to-resolvecom-github-philjaympandroidchartv2-1-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!