1

Before you ask, I already have the last version of Android Studio (0.5.8).

This is the problem: Layout error

What I did to import the library was:

  • Copy the .jar file to the libs directory
  • Right click the .jar and choose 'Add as Library'

I already checked that it's in the build.gradle: compile dependency

I can use it programmatically getting no errors: not compilation errors nor runtime errors. And if I delete Android Plot's custom attributes, the error disappears, but when the Activity loads, the XYPlot isn't there.

What am I missing?

2 Answers2

1

Even I faced the same problem then after googling for long time Finally got the below dependency

By adding the following dependency in the app build.gradle file

"implementation 'com.androidplot:androidplot-core:0.6.1'"

0

I don't think Android Studio has the ability to to this. Anyway, I have never been able to get it working on any custom elements. I have already used different custom elements in the layout files, but none of them did actually work so far in Android Studio. So I don't think the problem is the plot element you are using.

In most cases, I just test it in a simulator or on a real device. So I am absolutely sure it works. I know it's a little stupid you can't test your layout in de Android Studio directly, but it works for me.

ndsmyter
  • 6,535
  • 3
  • 22
  • 37
  • I think I didn't explain myself clearly enough. The plot element isn't showing on the real device (I haven't tested on the emulator though). I included a screenshot of the Android Studio layout designer preview because that's the only place I've seen the error. – Daniel Hernández Alcojor May 09 '14 at 09:41