【填坑记录】
背景:按照官方API使用方法以引入implementation ‘com.github.PhilJay:MPAndroidChart:v3.0.3’,在布局文件中使用<com.github.mikephil.charting.charts.PieChart 提示报错。
解决:最新的project是放在settings.gradle里:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
jcenter() // Warning: this repository is going to shut down soon
}
}