Problems running application in the emulator and on the mobile device.

edited December 2013 in Android Mode

Hello! I'm having trouble running the emulator and also on my mobile device. What is below is what I get after being in construction mode, I have no idea who might be. I am new to this. Thank you.

BUILD FAILED
C:\Users\HP\Application Data\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:892: The following error occurred while executing this line:
C:\Users\HP\Application Data\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:894: The following error occurred while executing this line:
C:\Users\HP\Application Data\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:906: The following error occurred while executing this line:
C:\Users\HP\Application Data\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\tools\ant\build.xml:284: null returned: 2
Total time: 32 seconds

Answers

  • At line 284 in build.xml (assuming that you are running the same version of the SDK tools that I am), we have the following ant definition that locates dex:

    <dex executable="${dx}"
            output="${intermediate.dex.file}"
            dexedlibs="${out.dexed.absolute.dir}"
            nolocals="@{nolocals}"
            forceJumbo="${dex.force.jumbo}"
            disableDexMerger="${dex.disable.merger}"
            verbose="${verbose}">
        <path path="${out.dex.input.absolute.dir}"/>
        <path refid="out.dex.jar.input.ref" />
        <external-libs />
    </dex>
    

    dex should be located in .../sdk/platform-tools/lib/, named dx.jar.

    I'm surprised that you got such an ambiguous error message. The most likely culprit is that your Android SDK and / or your Android ADT isn't installed correctly. More details could lead to a better solution. This problem has been experienced on these forums before.

Sign In or Register to comment.