AChartEngine 和 Android Studio [英] AChartEngine And Android Studio

查看:37
本文介绍了AChartEngine 和 Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须创建一个广泛使用图表的应用程序.阅读网页时,我选择了似乎拥有我需要的一切的图表引擎.

I have to create an application that makes extensive use of charts. Reading the web I chose achartengine that seems to have everything I need.

我下载了 jar 文件,插入了 libs 文件夹,我选择了添加到库",然后我用午餐清理了 gradlew.结果在我导入 org.achartengine.xxxx 的源中我总是返回无法解析符号的错误.

I downloaded the jar file, I plugged in the libs folder, I selected "add to library" and I lunch the gradlew clean. Result in the sources where I do the import of org.achartengine.xxxx I always returned the error that fails to resolve symbols .

你有什么建议吗?谢谢安德里亚

Do you have suggestions? Thank you Andrea

推荐答案

我可以在我的 Android Studio 项目中使用这个库,本主题 解释了如何将 AChartEngine 存储库添加到您的项目中.

I am able to use this library in my Android Studio project, this topic explains how to add AChartEngine repo to your project.

我做了什么:

  1. 将以下内容添加到项目范围的 build.gradle(来自项目根目录的一个):

  1. Added following to project-wide build.gradle (one from the project root):

allprojects {
    repositories {
        ...
        maven {
            url "https://repository-achartengine.forge.cloudbees.com/snapshot/"
        }
    }
}

  • 对于每个使用该库的模块,将它添加到它的 build.gradle(如果它应该包含在所有模块中,你可以将它添加到顶级 build.gradle):

  • For every module that uses the library, add this to its build.gradle (you may put this to the top-level build.gradle if it should be included in all modules):

    dependencies {
        ...
        compile group: 'org.achartengine', name: 'achartengine', version: '1.2.0'
    }
    

  • 现在我可以在项目中使用库了,我看到代码辅助弹出窗口中的类并且构建运行成功.

    Now I can use the library in the project, I see the classes in code assist popups and build runs as succeeds.

    这篇关于AChartEngine 和 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆