Error creating dex file while building using ANT

by phoenix » Sat, 24 Oct 2009 02:46:22 GMT


Sponsored Links
 I created a sample project using the below command:
android create project --target 1 --name HelloAndroid --path ./
HelloAndroid --activity HelloAndroid --package com.helloandroid

then attempted to build it using ANT. It gives the below error while
creating the .dex file.

C:\workspace\HelloAndroid>ant debug
Buildfile: build.xml
    [setup] Project Target: Android 1.1
    [setup] API level: 2

dirs:
     [echo] Creating output directories if needed...

resource-src:
     [echo] Generating R.java / Manifest.java from the resources...

aidl:
     [echo] Compiling aidl files into Java classes...

compile:
    [javac] Compiling 1 source file to C:\workspace\HelloAndroid\bin
\classes

dex:
     [echo] Converting compiled files and external libraries into bin/
classes.de
x...
    [apply]
    [apply] trouble writing output:
java.security.NoSuchAlgorithmException: SHA-
1 MessageDigest not available

BUILD FAILED
C:\android-sdk-windows-1.6_r1\platforms\android-1.1\templates
\android_rules.xml:
129: apply returned: 2

Total time: 5 seconds

Can you please suggest how should I solve this problem.

--~--~---------~--~----~------------~-------~--~----~



Error creating dex file while building using ANT

by RichardC » Sat, 24 Oct 2009 08:04:36 GMT


 What does:

java -vesion

return?

--
RichardC



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Attempting to build wrapsim for x86

I'm trying to build the simulator lib for x86 and I'm running into
some strange problems, most of which seem related to header conflicts
between bionic libc and my host (ubuntu 9.04).

A few things I resolved:

LOCAL_CFLAGS += -D__off_t=uint32_t -D__off64_t=uint64_t
in the makefile fixed some type issues.

Commented out some of the 64 bit syscalls to avoid duplicate
definitions (clearly lstat == lstat64 in the android libc)

Adding signal.h and removing ftw.h fixed a few things too.

Now I'm hitting a large number of errors like

/usr/include/bits/types.h:134: error: conflicting types for '__dev_t'
bionic/libc/include/sys/_types.h:43: error: previous declaration of
'__dev_t' was here
/usr/include/bits/types.h:137: error: conflicting types for '__ino_t'
bionic/libc/include/sys/_types.h:49: error: previous declaration of
'__ino_t' was here

It seems odd to me that a) it's pulling both bionic and local headers
and b) that there are conflicting definitions.  For chuckles I tried
building with -nostdinc to leave off the local headers but then I get
a whole pile of other errors which makes me suspect that there is some
legitimate dependency on at least some local headers.

There are a bunch of other errors like

/usr/include/sys/sem.h:53: error: expected '=', ',', ';', 'asm' or
'__attribute__' before '__THROW'

that are mostly in the IPC headers (sem and shm).

Any ideas to help me keep moving?

cheers,

Kris
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Updated to 1.5 and R.java is not regeneratated

When updating an old project that doesn't have the gen source folder
setup, it first detects if the gen folder already exists, and if so,
generates this error.
The idea was to not convert and pre-existing gen folder (or file) into
an Eclipse source folder.

Are you sure you didn't have the gen folder before updating to ADT 0.9?

thanks
Xav

On Thu, Apr 30, 2009 at 2:46 PM, Richard Schilling









-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

--~--~---------~--~----~------------~-------~--~----~

3. Differentiating between Simulator v/s. Real device

4. How to detect whether the virtual keyboard is visible or not? SDK 1.5

5. How to Detect Soft Keyboard / Resize?

6. Clone hidden row and display the cloned one with visibility seetings to true

7. How to play voice files on Touch Event