Ok! I got it to work finally! (phew)

It turned out that the problem lay with my JRE. Android needs only
Oracle's JRE and my eclipse was pointing to IBM JRE.

I installed the JDK and pointed eclipse to the JRE in oracle's java
folder and the error was gone.

Hope this helps someone else in future.

-Sumanth

On Dec 17, 1:23 pm, sumanth <[email protected]> wrote:
> Hi Dimitris,
>
> I changed the build output to verbose. My eye didn't catch anything
> unusual in the logs:
>
> [2010-12-17 13:47:45 - HelloAndroid] Refreshing resource folders.
> [2010-12-17 13:47:45 - HelloAndroid] Starting incremental Pre
> Compiler: Checking resource changes.
> [2010-12-17 13:47:45 - HelloAndroid] Nothing to pre compile!
> [2010-12-17 13:47:45 - HelloAndroid] Starting incremental Package
> build: Checking resource changes.
> [2010-12-17 13:47:45 - HelloAndroid] C:\softwares\sdk_android\platform-
> tools\aapt.exe package -f -v --debug-mode -M C:\softwares\androkspace
> \HelloAndroid\AndroidManifest.xml -S C:\softwares\androkspace
> \HelloAndroid\res -A C:\softwares\androkspace\HelloAndroid\assets -I C:
> \softwares\sdk_android\platforms\android-9\android.jar -F C:\softwares
> \androkspace\HelloAndroid\bin\resources.ap_
> [2010-12-17 13:47:45 - HelloAndroid] Found 0 custom asset files in C:
> \softwares\androkspace\HelloAndroid\assets
> [2010-12-17 13:47:45 - HelloAndroid] Locale/Vendor pairs:
> [2010-12-17 13:47:45 - HelloAndroid]    /
> [2010-12-17 13:47:45 - HelloAndroid]    /
> [2010-12-17 13:47:45 - HelloAndroid]    /
> [2010-12-17 13:47:45 - HelloAndroid]    /
> [2010-12-17 13:47:45 - HelloAndroid]
> [2010-12-17 13:47:45 - HelloAndroid] Files:
> [2010-12-17 13:47:45 - HelloAndroid]   drawable-hdpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\drawable-hdpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]   drawable-ldpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\drawable-ldpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]   drawable-mdpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\drawable-mdpi\icon.png
> [2010-12-17 13:47:45 - HelloAndroid]   layout\main.xml
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\layout\main.xml
> [2010-12-17 13:47:45 - HelloAndroid]   values\strings.xml
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\res\values\strings.xml
> [2010-12-17 13:47:45 - HelloAndroid]   AndroidManifest.xml
> [2010-12-17 13:47:45 - HelloAndroid]       Src: C:\softwares
> \androkspace\HelloAndroid\AndroidManifest.xml
> [2010-12-17 13:47:45 - HelloAndroid] Including resources from package:
> C:\softwares\sdk_android\platforms\android-9\android.jar
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for drawable
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for layout
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for anim
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for xml
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for raw
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for color
> [2010-12-17 13:47:45 - HelloAndroid] applyFileOverlay for menu
> [2010-12-17 13:47:45 - HelloAndroid]     (processed image C:\softwares
> \androkspace\HelloAndroid\res\drawable-hdpi\icon.png: 95% size of
> source)
> [2010-12-17 13:47:45 - HelloAndroid]     (processed image C:\softwares
> \androkspace\HelloAndroid\res\drawable-ldpi\icon.png: 89% size of
> source)
> [2010-12-17 13:47:45 - HelloAndroid]     (processed image C:\softwares
> \androkspace\HelloAndroid\res\drawable-mdpi\icon.png: 85% size of
> source)
> [2010-12-17 13:47:45 - HelloAndroid]     (new resource id icon from
> drawable-hdpi\icon.png #generated)
> [2010-12-17 13:47:45 - HelloAndroid]     (new resource id icon from
> drawable-hdpi\icon.png #generated)
> [2010-12-17 13:47:45 - HelloAndroid]     (new resource id icon from
> drawable-hdpi\icon.png #generated)
> [2010-12-17 13:47:45 - HelloAndroid]     (new resource id main from C:
> \softwares\androkspace\HelloAndroid\res\layout\main.xml)
> [2010-12-17 13:47:45 - HelloAndroid] Opening 'C:\softwares\androkspace
> \HelloAndroid\bin\resources.ap_'
> [2010-12-17 13:47:45 - HelloAndroid] Writing all files...
> [2010-12-17 13:47:45 - HelloAndroid]       'res/layout/
> main.xml' (compressed 57%)
> [2010-12-17 13:47:45 - HelloAndroid]
> 'AndroidManifest.xml' (compressed 61%)
> [2010-12-17 13:47:45 - HelloAndroid]       'resources.arsc' (not
> compressed)
> [2010-12-17 13:47:45 - HelloAndroid]       'res/drawable-hdpi/
> icon.png' (not compressed)
> [2010-12-17 13:47:45 - HelloAndroid]       'res/drawable-ldpi/
> icon.png' (not compressed)
> [2010-12-17 13:47:45 - HelloAndroid]       'res/drawable-mdpi/
> icon.png' (not compressed)
> [2010-12-17 13:47:45 - HelloAndroid] Generated 6 files
> [2010-12-17 13:47:45 - HelloAndroid] Included 0 files from jar/zip
> files.
> [2010-12-17 13:47:45 - HelloAndroid] Checking for deleted files
> [2010-12-17 13:47:45 - HelloAndroid] Done!
> [2010-12-17 13:47:45 - HelloAndroid]: Dxignored resource C:\softwares
> \androkspace\HelloAndroid\bin\.\classes.dex
> [2010-12-17 13:47:45 - HelloAndroid]: Dxprocessing C:\softwares
> \androkspace\HelloAndroid\bin\.\com\example\hello
> \HelloAndroid.class...
> [2010-12-17 13:47:45 - HelloAndroid]: Dxprocessing C:\softwares
> \androkspace\HelloAndroid\bin\.\com\example\hello\R$attr.class...
> [2010-12-17 13:47:45 - HelloAndroid]: Dxprocessing C:\softwares
> \androkspace\HelloAndroid\bin\.\com\example\hello\R$drawable.class...
> [2010-12-17 13:47:45 - HelloAndroid]: Dxprocessing C:\softwares
> \androkspace\HelloAndroid\bin\.\com\example\hello\R$layout.class...
> [2010-12-17 13:47:45 - HelloAndroid]: Dxprocessing C:\softwares
> \androkspace\HelloAndroid\bin\.\com\example\hello\R$string.class...
> [2010-12-17 13:47:45 - HelloAndroid]: Dxprocessing C:\softwares
> \androkspace\HelloAndroid\bin\.\com\example\hello\R.class...
> [2010-12-17 13:47:45 - HelloAndroid]: Dx
> UNEXPECTED TOP-LEVEL EXCEPTION:
> java.util.zip.ZipException: error in opening zip file
>         at java.util.zip.ZipFile.open(Native Method)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:115)
>         at java.util.zip.ZipFile.<init>(ZipFile.java:132)
>         at
> com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.jav a:
> 205)
>         at
> com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
> 130)
>         at
> com.android.dx.cf.direct.ClassPathOpener.processDirectory(ClassPathOpener.j 
> ava:
> 190)
>         at
> com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:
> 122)
>         at
> com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:
> 108)
>         at com.android.dx.command.dexer.Main.processOne(Main.java:284)
>         at com.android.dx.command.dexer.Main.processAllFiles(Main.java:220)
>         at com.android.dx.command.dexer.Main.run(Main.java:176)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 48)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> l.java:
> 25)
>         at java.lang.reflect.Method.invoke(Method.java:600)
>         at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(Unknown
> Source)
>         at
> com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(Unknown
> Source)
>         at
> com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.bui 
> ld(Unknown
> Source)
>         at org.eclipse.core.internal.events.BuildManager
> $2.run(BuildManager.java:627)
>         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>         at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
> 170)
>         at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
> 201)
>         at org.eclipse.core.internal.events.BuildManager
> $1.run(BuildManager.java:253)
>         at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>         at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
> 256)
>         at
> org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.j 
> ava:
> 309)
>         at
> org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
> 341)
>         at
> org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
> 140)
>         at
> org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
> 238)
>         at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> [2010-12-17 13:47:45 - HelloAndroid]: Dxignored resource C:\softwares
> \androkspace\HelloAndroid\bin\.\resources.ap_
> [2010-12-17 13:47:45 - HelloAndroid]: Dx1 error; aborting
> [2010-12-17 13:47:45 - HelloAndroid] Conversion to Dalvik format
> failed with error 1
> [2010-12-17 13:51:00 - HelloAndroid] Refreshing resource folders.
> [2010-12-17 13:51:00 - HelloAndroid] Starting incremental Pre
> Compiler: Checking resource changes.
> [2010-12-17 13:51:00 - HelloAndroid] Nothing to pre compile!
>
> why is there a ZipException?...which zip is it looking for?
>
> Thanks,
> Sumanth
>
> On Dec 17, 1:54 am, Dimitris <[email protected]> wrote:
>
>
>
>
>
>
>
> > Check your project dependencies, go to Window -> Properties -> Android
> > -> Build and put it on Verbose.
>
> > Then use the console to see (make sure Console view is Android instead
> > of DDMS) and see if there is an error there.
>
> > On Dec 15, 10:51 pm, sumanth <[email protected]> wrote:
>
> > > Hi Christopher,
>
> > > I looked up the build path and it contains only the library of android
> > > 2.2 (i tried it with other versions, including the new 2.3).
>
> > > Nothing seems to work, let me know if you/anyone have any ideas.
>
> > > Thanks
> > > Sumanth
>
> > > On Dec 7, 8:07 am, Christopher Lester <[email protected]> wrote:
>
> > > > Sumanth - I had this error yesterday and found this helpful.
>
> > > > Go to Project » Properties » Java Build Path » Libraries and remove
> > > > all except the "Android X.Y" (in my case Android 2.2). click OK. Go to
> > > > Project » Clean » Clean projects selected below » select your project
> > > > and click OK. That should work.
>
> > > > On Dec 1, 10:59 pm, sumanth <[email protected]> wrote:
>
> > > > > Hi all,
>
> > > > > I'm new to android and currently stuck with this error when I try to
> > > > > create a simple android project.
>
> > > > > I apologize if this is a repost, but the solutions in
>
> ...
>
> read more »

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to