2020년 6월 4일 목요일

When you meet the error 'Failed to resolve: com.github.PhilJay:MPAndroidChart:v3.1.1'

in build.gradle(Project: project name)

buildscript {    ext.kotlin_version = "1.3.72"    repositories {        maven { url 'https://jitpack.io'}
        google()
        jcenter()
    }    dependencies {        classpath "com.android.tools.build:gradle:4.0.0"        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}
allprojects {    repositories {        maven { url 'https://jitpack.io'}
        google()
        jcenter()
    }}


in build.gradle(Module: app)
dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"    implementation 'androidx.core:core-ktx:1.3.0'    implementation 'androidx.appcompat:appcompat:1.1.0'    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
    testImplementation 'junit:junit:4.13'    androidTestImplementation 'androidx.test.ext:junit:1.1.1'    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'}

댓글 없음:

댓글 쓰기