Error:(38, 13) Failed to resolve: com.github.PhilJay:MPAndroidChart:v3.0.1 <a href="openFile:/Users/

来源:互联网 发布:ubuntu显示乱码 编辑:程序博客网 时间:2024/05/16 05:12

首先说一下MPAndroidChart,他是一个包含(柱状图,折线图,饼状图)的第三方库,但是今天在使用这个库的使用出现了一个问题:


解决办法:在项目的build.grdle中加入

maven { url "https://jitpack.io" }如图所示
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {    repositories {        jcenter()    }    dependencies {        classpath 'com.android.tools.build:gradle:2.2.3'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {        jcenter()        //远程仓库        gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } }        maven { url "https://github.com/J2W/mvn-repo-j2w/raw/master/repository" }        maven { url "https://jitpack.io" }    }}task clean(type: Delete) {    delete rootProject.buildDir}


0 0
原创粉丝点击