我是一个新的MPAndroidChart用户.
我已经在网上和维基中发现的例子在这里都给予了setDescription()的原型为:
setDescription(String desc)`
Run Code Online (Sandbox Code Playgroud)
但是,mChart.setDescription("");不能为我编译和AndroidStudio-> Go To Declaration告诉我Chart.java中定义的setDescription声明是:
public void setDescription(Description desc) {
this.mDescription = desc;
}
Run Code Online (Sandbox Code Playgroud)
Description.java中的Description构造函数不接受String.
如何设置描述(或至少将其关闭)?我指的是错误的图书馆吗?
这是我的应用程序的gradle文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
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
} …Run Code Online (Sandbox Code Playgroud)