Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
493 views
in Technique[技术] by (71.8m points)

charts - AChartEngine And 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.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

What I did:

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

    allprojects {
        repositories {
            ...
            maven {
                url "https://repository-achartengine.forge.cloudbees.com/snapshot/"
            }
        }
    }
    
  2. 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...