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. natvie code try/catch statement support or not

Hi,

Below try/catch code can not pass build:
#include <stdio.h>

int main()
{
    try
    {
        printf("try statement\n");
        throw 1;
    }
    catch (...)
    {
       printf("catch exeption here\n");
    }
}

Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_ARM_MODE := arm

LOCAL_SRC_FILES := \
./test.cpp

LOCAL_CFLAGS += -fexceptions

LOCAL_LDFLAGS += -lstdc++

LOCAL_MODULE := test

include $(BUILD_EXECUTABLE)

How can we use try/catch on android? Any other flags needed for
Android.mk?

Below is compile error message:
target Executable: test (out/target/product/generic/obj/EXECUTABLES/
test_intermediates/LINKED/test)
out/target/product/generic/obj/EXECUTABLES/test_intermediates/./
test.o: In function `main':
/home/e12714/workspace/mydroid/try_catch/./test.cpp:9: undefined
reference to `__cxa_allocate_exception'
/home/e12714/workspace/mydroid/try_catch/./test.cpp:9: undefined
reference to `__cxa_throw'
/home/e12714/workspace/mydroid/try_catch/./test.cpp:11: undefined
reference to `__cxa_begin_catch'
/home/e12714/workspace/mydroid/try_catch/./test.cpp:11: undefined
reference to `__cxa_end_catch'
/home/e12714/workspace/mydroid/try_catch/./test.cpp:11: undefined
reference to `__cxa_end_catch'
/home/e12714/workspace/mydroid/try_catch/./test.cpp:11: undefined
reference to `__cxa_end_cleanup'
/home/e12714/workspace/mydroid/try_catch/./test.cpp:11: undefined
reference to `typeinfo for int'
out/target/product/generic/obj/EXECUTABLES/test_intermediates/./test.o:
(.ARM.extab.text.main+0x0): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status
make: *** [out/target/product/generic/obj/EXECUTABLES/
test_intermediates/LINKED/test] Error 1


BRs
lucky
2008/12/19

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

2. Adding a GridView to a TableRow.

Hi,
I am trying to add a GridView inside a TableRow and its not working.
The GridView is basically a grid of buttons being populated through an
adapter. If I add it directly to the TableLayout then it displays
fine. I can see the 4X4 grid of buttons. But if I add it to a TableRow
which is then added to the TableLayout the grid of buttons is not
displayed. The adapter for the gridview does executes but i have no
clue why i can't see the grid. Any help here?

PS The layout file only contains a framelayout to which everything is
finally added.

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

3. Usage of ArrayAdapter leads me to Index Array out of Bounds Exception

4. When will star the Android Developer Challenge II ?

5. onProviderEnabled / onProviderDisabled unexpected behavior

6. What format is edit_text.xml, and how can I make one?

7. Media Player blocks IO