error compilng the android source

1,974 views
Skip to first unread message

abcdude

unread,
Jun 29, 2011, 2:49:19 AM6/29/11
to panda...@googlegroups.com
hi i have tried to compile the android source (Gingerbread) on ubuntu 10.10(64 bit). and iam getting a compilation error . Can anyone tell me any solution.
android_make.out

Manu Reddy

unread,
Jun 29, 2011, 6:32:56 AM6/29/11
to panda...@googlegroups.com
more specifically the error messages that i am getting are as follows

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
hardware/ti/wpan/tools/BluetoothSCOApp/src/com/ti/bluetoothSCOapp/connect.java:24: cannot access java.util.Set
bad class file: java/util/Set.class(java/util:Set.class)
unable to access file: corrupted zip file
Please remove or make sure it appears in the correct subdirectory of the classpath.
import java.util.Set;
                ^
make: *** [out/target/common/obj/APPS/BluetoothSCOApp_intermediates/classes-full-debug.jar] Error 41
make: *** Waiting for unfinished jobs....
out/target/common/obj/APPS/Calculator_intermediates/src/com/android/calculator2/R.java:10: cannot access java.lang.Object
bad class file: java/lang/Object.class(java/lang:Object.class)
unable to access file: corrupted zip file
Please remove or make sure it appears in the correct subdirectory of the classpath.
public final class R {
             ^
make: *** [out/target/common/obj/APPS/Calculator_intermediates/classes-full-debug.jar] Error 41
out/target/common/obj/APPS/DeskClock_intermediates/src/com/android/deskclock/R.java:10: cannot access java.lang.Object
bad class file: java/lang/Object.class(java/lang:Object.class)
unable to access file: corrupted zip file
Please remove or make sure it appears in the correct subdirectory of the classpath.
public final class R {
             ^
make: *** [out/target/common/obj/APPS/DeskClock_intermediates/classes-full-debug.jar] Error 41
out/target/common/obj/APPS/Camera_intermediates/src/com/android/camera/R.java:10: cannot access java.lang.Object
bad class file: java/lang/Object.class(java/lang:Object.class)
unable to access file: corrupted zip file
Please remove or make sure it appears in the correct subdirectory of the classpath.
public final class R {
             ^
make: *** [out/target/common/obj/APPS/Camera_intermediates/classes-full-debug.jar] Error 41

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Mark Olleson

unread,
Jun 29, 2011, 6:55:30 AM6/29/11
to pandaboard
This looks like a fairly self explanatory error. I would have hoped
that you had tried the obvious before posting on here. Just in case
you didn't:

1) Does the class file exist? (you can use strace to find out where
the compiler is looking for it if that's not obvious)
2) Is it a valid zip file? (try decompressing it with zip)
3) [unlikely] are the zip file's contents consistent with a Java class
file?

The most likely cause is that the CLASSPATH environment variable is
not set correctly.




On Jun 29, 11:32 am, Manu Reddy <manubharg...@gmail.com> wrote:
> more specifically the error messages that i am getting are as follows
>
> --------------------------------------------------------------------------- --------------------------------------------------------------------------- -----------------------------------------------
> hardware/ti/wpan/tools/BluetoothSCOApp/src/com/ti/bluetoothSCOapp/connect.j ava:24:
> cannot access java.util.Set
> bad class file: java/util/Set.class(java/util:Set.class)
> unable to access file: corrupted zip file
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.
> import java.util.Set;
>                 ^
> make: ***
> [out/target/common/obj/APPS/BluetoothSCOApp_intermediates/classes-full-debu g.jar]
> Error 41
> make: *** Waiting for unfinished jobs....
> out/target/common/obj/APPS/Calculator_intermediates/src/com/android/calcula tor2/R.java:10:
> cannot access java.lang.Object
> bad class file: java/lang/Object.class(java/lang:Object.class)
> unable to access file: corrupted zip file
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.
> public final class R {
>              ^
> make: ***
> [out/target/common/obj/APPS/Calculator_intermediates/classes-full-debug.jar ]
> Error 41
> out/target/common/obj/APPS/DeskClock_intermediates/src/com/android/deskcloc k/R.java:10:
> cannot access java.lang.Object
> bad class file: java/lang/Object.class(java/lang:Object.class)
> unable to access file: corrupted zip file
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.
> public final class R {
>              ^
> make: ***
> [out/target/common/obj/APPS/DeskClock_intermediates/classes-full-debug.jar]
> Error 41
> out/target/common/obj/APPS/Camera_intermediates/src/com/android/camera/R.ja va:10:

abcdude

unread,
Jun 29, 2011, 1:37:10 PM6/29/11
to panda...@googlegroups.com
i didnt quite get what did you mean by doesnt that class file exist.) its a java class file ... so i guess it should exist in the system.

Svartalf

unread,
Jul 6, 2011, 4:02:55 PM7/6/11
to pandaboard

On Jun 29, 12:37 pm, abcdude <manubharg...@gmail.com> wrote:
> i didnt quite get what did you mean by doesnt that class file exist.) its a
> java class file ... so i guess it should exist in the system.


Not a classpath problem- and the error codes aren't in the least bit
helpful or self-explanatory (I can relate here... :-D ) . I had the
same problem building a build from OMAPedia for the Blaze as a dry run
for something else. A bit of initial digging led me here. A bit
stronger/deeper use of Google-fu led me to one of the android dev
lists archived on OSDir.

There's this nifty little tool called "fastjar", written in C, that at
least Ubuntu 10.10 provides and selects the main "alternative" for jar
tasks as it's up to 100 times faster than the Java based jar tool,
even if it's not complete when compared to the java jar tool. It
typically produces "usable" jar files...well, at least for Java
runtimes, that is...

Unfortunately, while the jar is "corrupt" as far as the jar to dex
conversion, it's not corrupt in the normal sense of things, meaning
the file's openable, etc.- and it doesn't really tell you WHICH file
is "corrupted" so you could do a comparison/analysis.

Long story short, run "sudo update-alternatives --config jar" and
select the corresponding jar tool from the 1.6 JDK you're using. This
should fix things enough for you to do a clean build of things at that
point.
Reply all
Reply to author
Forward
0 new messages