Question

I've been trying to add a library called 'Android Plot' into my project, however I cannot seem to get past this error. Screen shots are below. This library has worked in other test projects I have done before.

I am using Android Studio. Suggestions about how I can get past this would be great. Thanks

The file tree showing that the library is added

high lighted xml code that doesn't work

Project structure showing that the library is used

Was it helpful?

Solution

Figured it out. AndroidStudio is still in it's "ghetto" stage so if you try to add a library dependency in typical IntelliJ fashion you get a warning telling you that whatever you do in the project/module dialog (which shows up when you select it) actually has no effect on your build and that you must edit build.gradle manually.

In the case of Androidplot 0.5.2 heres what you do:

  1. Add androidplot-core-0.5.2.jar into your /libs dir
  2. In the dependencies section of build. gradle add:

    compile files('libs/androidplot-core-0.5.2.jar')

Once you've done this you should be OK.

Nick

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top