Trying to build Android open source project on Ubuntu 10.04 (on VMware Player).
I followed the instructions at this link (and it said to use sun-java5 JDK 1.5 which takes some fishing to find for Ubuntu) –
Got 299 compile errors. Wondering if the direction to use JDK 1.5 is out of date? Some of the errors are as follows (and many similar) –
external/jsilver/src/com/google/clearsilver/jsilver/data/HDFDataFactory.java:77: method does not override a method from its superclass
@Override
external/jsilver/src/com/google/clearsilver/jsilver/data/UniqueStack.java:106: cannot find symbol
symbol : method offerLast(T)
location: class java.util.LinkedList<T>
objectStack.offerLast(object);
external/jsilver/src/com/google/streamhtmlparser/impl/HtmlParserImpl.java:507: cannot find symbol
symbol : method isEmpty()
location: class java.lang.String
if (!tagString.isEmpty() && tagString.charAt(0) == '/') {
external/jsilver/src/com/google/streamhtmlparser/util/JavascriptTokenBuffer.java:80: cannot find symbol
symbol : method copyOf(char[],int)
location: class java.util.Arrays
buffer = Arrays.copyOf(aJavascriptTokenBuffer.buffer,
Thanks for comments and suggestions.
Conclusion – I did get a successful build with Sun JDK 1.6. It took 7 or 8 attempts and doing “make clean” every time was important.
Note the errors shown in the question above are for java methods that were added in Java 1.6 – so the Android source requires Java 1.6 now on the master source branch (see link from German in this thread) even though the directions say to use Java 1.5. It failed trying to do a 64 bit build due to C library dependencies. I used the suggested solution in the following link that required making a small change to 4 make files so it could do a 32 bit build (the makefiles are set up to do a 64 bit build if you are using Java 1.6 for some reason).
See “sol 2” by user amberved at this link – that is what worked for me.
In answer to the above comment questions – um I think I have 32bit Ubuntu (how do I tell?). System is Ubuntu running on VMware running on 32bit Vista system. Regarding “necessary to compile in 64bit with java6” my edits to the referenced makefiles is the workaround for 32bit build.
I think uname would report something like i686_64 if Linux was 64 bit OS?
uname -a
Linux jotobjects-ubuntu 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux