我想在我的專案中使用 MPAndroidChart。
我在我的 gradle 中添加了該庫,但在我的 xml 布局檔案中,我找不到 Chart。
我的 build.gradle(Module) 是這樣的:
dependencies {
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
}
build.gradle(Project) 是這樣的:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
但我在我的 xml 布局檔案中找不到圖表

uj5u.com熱心網友回復:
添加maven { url 'https://jitpack.io' }in setting.gradle檔案而不是 build.gradle(Project)
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/434185.html
標籤:xml 科特林 安卓布局 mpandroidchart
