Java Android,正在尝试添加图表

Java Android,正在尝试添加图表,java,android,Java,Android,我正在使用一个带有Android(nexus模拟器)的IOIO板,我有了基本的IOIO连接。我可以采样2个模拟引脚 下一步是尝试绘制结果图。 在我的生活中 compile 'com.jjoe64:graphview:4.1.0' 在MainActivity中,onCreate I have(注释掉) 在Looper中我已经(也注释掉了) LineGraphSeries系列=新的LineGraphSeries(新数据点[]{ 新数据点(0,3)、新数据点(1,3)、新数据点(2,6) });

我正在使用一个带有Android(nexus模拟器)的IOIO板,我有了基本的IOIO连接。我可以采样2个模拟引脚

下一步是尝试绘制结果图。 在我的生活中

compile 'com.jjoe64:graphview:4.1.0'
在MainActivity中,onCreate I have(注释掉)

在Looper中我已经(也注释掉了)

LineGraphSeries系列=新的LineGraphSeries(新数据点[]{
新数据点(0,3)、新数据点(1,3)、新数据点(2,6)
});
在activity_main.xml中,我已经(注释掉了)

-->
当我运行它时,我得到一条消息:必须使用硬件加速,但main.AndroidManifest.xml中有

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:hardwareAccelerated="true"
android:theme="@style/AppTheme">

由于所有内容基本上都已注释掉,因此程序仍以基本模式运行。 一旦我删除activity_main.xml中的注释,程序就会崩溃。 我不知道这是否是因为硬件加速没有真正启动,或者还有什么问题?
任何评论都将不胜感激。

没有听到任何提示,我尝试了一个已经编译好的graphview应用程序。最后我找到了一个有效的方法

我有一个猜测,也许它可能是依赖关系中的某个东西。依赖项是

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:23.1.1'
  compile files('libs/GraphView-4.0.1.jar')
//    compile 'com.jjoe64:graphview:4.1.0'
}
我在程序中添加了编译“com.jjoe64:graphview:4.1.0”。通过取消对该行的注释并注释掉其正上方的行,程序开始失败,并显示相同的“必须使用硬件加速”消息


为了确保我把评论改回了上面的内容,做了一次清理,然后再试一次。我又回到线上了。为什么这会产生如此大的影响我不知道,但目前我知道如何继续我的项目。

没有听到任何提示,我尝试了一个已经编译好的graphview应用程序。最后我找到了一个有效的方法

我有一个猜测,也许它可能是依赖关系中的某个东西。依赖项是

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:23.1.1'
  compile files('libs/GraphView-4.0.1.jar')
//    compile 'com.jjoe64:graphview:4.1.0'
}
我在程序中添加了编译“com.jjoe64:graphview:4.1.0”。通过取消对该行的注释并注释掉其正上方的行,程序开始失败,并显示相同的“必须使用硬件加速”消息

为了确保我把评论改回了上面的内容,做了一次清理,然后再试一次。我又回到线上了。为什么这会产生如此大的影响我不知道,但目前我知道如何继续我的项目

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:hardwareAccelerated="true"
android:theme="@style/AppTheme">
dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  testCompile 'junit:junit:4.12'
  compile 'com.android.support:appcompat-v7:23.1.1'
  compile files('libs/GraphView-4.0.1.jar')
//    compile 'com.jjoe64:graphview:4.1.0'
}