Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDk Compliance issues

 
Sean Michael Hayes
Ranch Hand
Posts: 54
Android
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this goes in here or the Android forums but here goes.

I wanted to implement a chart view in my Android app and used [url = http://www.jjoe64.com/p/graphview-library.html]GraphView[/url] for this. I wanted to test its update and redraw features so for this test I called the appendData() class. Problem, when I try to run it, I get this error with that method.

I researched the problem and it seems to be that the copyOf method is in JDK 1.6, while the compliance level of my Android project is 1.5, no problem, I changed the compliance level, refreshed and cleaned the project but I still get the error. I poked around the preferences further but cannot see what my problem is. Can anyone give me some guidance on what to do here? I'm using JRE7 as the JRE and the JAVA_HOME variable is set to JDK 1.7.0.
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this should really be asked in the Android forum, I'll move the post for you. I suspect that you are running into one of the methods that is not provided on the Android platform (which is not 100% Java compliant), hence the error.
 
Sean Michael Hayes
Ranch Hand
Posts: 54
Android
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter Johnson wrote:Yes, this should really be asked in the Android forum, I'll move the post for you. I suspect that you are running into one of the methods that is not provided on the Android platform (which is not 100% Java compliant), hence the error.


Thanks for the reply and you are indeed right! I was using API level 8 as my Android API and did not realise that it only supported JDK 1.5 and below. I couldn't upgrade my API as my Samsung Galaxy mini did not support any higer so I simply overrode the method and replaced the 1.6 methods with a 1.5 equivalent (System.arrayCopy) and it seems to work!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic