• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

JDk Compliance issues

 
Ranch Hand
Posts: 54
Android
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
You had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic