【问题标题】:When I use Androidplot in my Fragment it can not read values from line_point_formatter_with_labels.xml当我在 Fragment 中使用 Androidplot 时,它无法从 line_point_formatter_with_labels.xml 读取值
【发布时间】:2017-11-03 19:51:37
【问题描述】:

我正在尝试使用来自this link的示例

我对代码做了一些小的修改,我使用的是片段而不是示例代码中的活动。现在,我遇到了line_point_formatter_with_labels.xmlline_point_formatter_with_labels_2.xml 配置文件的问题。示例代码无法从文件中读取值。它发生在以下行:

LineAndPointFormatter series1Format =
                    new LineAndPointFormatter(getActivity(), R.xml.line_point_formatter_with_labels);

我有这样的错误

java.lang.NumberFormatException:无效的 int:“#00AA00”。

知道为什么会这样吗?

谢谢。

【问题讨论】:

    标签: java android xml android-fragments androidplot


    【解决方案1】:

    存在一个与此非常相似的问题,这似乎是对 3.0.1 中的 Android Gradle 插件进行了某种未记录的更改。

    如果您想查看这是否对您有影响,短期修复是恢复到 2.3.3。该问题也将在 Androidplot 1.5.2 中得到解决。

    顺便说一句,Androidplot 已将其主要存储库从 Bitbucket 移至 Github。您可以使用其中任何一个,但 Bitbucket 存储库有时会滞后于发布。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-07
      • 1970-01-01
      • 2014-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-13
      • 1970-01-01
      相关资源
      最近更新 更多