Question

I just simply created my android project using

android create project -n MyApps -t 3 -p "./" --package com.ith -a MyAppActivity

all necessary files are created but when i tried to build with

ant release

command i get following error

-dex:
      [dex] Converting compiled files and external libraries into D:\Office\My A
pps\bin\classes.dex...
       [dx] unknown option: --output
       [dx] usage:
       [dx]   dx --dex [--debug] [--verbose] [--positions=<style>] [--no-locals]

       [dx]   [--no-optimize] [--statistics] [--[no-]optimize-list=<file>] [--no
-strict]
       [dx]   [--keep-classes] [--output=<file>] [--dump-to=<file>] [--dump-widt
h=<n>]
       [dx]   [--dump-method=<name>[*]] [--verbose-dump] [--no-files] [--core-li
brary]
       [dx]   [--num-threads=<n>] [<file>.class | <file>.{zip,jar,apk} | <direct
ory>] ...
       [dx]     Convert a set of classfiles into a dex file, optionally embedded
 in a
       [dx]     jar/zip. Output name must end with one of: .dex .jar .zip .apk.
Positions
       [dx]     options: none, important, lines.
       [dx]   dx --annotool --annotation=<class> [--element=<element types>]
       [dx]   [--print=<print types>]
       [dx]   dx --dump [--debug] [--strict] [--bytes] [--optimize]
       [dx]   [--basic-blocks | --rop-blocks | --ssa-blocks | --dot] [--ssa-step
=<step>]
       [dx]   [--width=<n>] [<file>.class | <file>.txt] ...
       [dx]     Dump classfiles, or transformations thereof, in a human-oriented
 format.
       [dx]   dx --junit [-wait] <TestClass>
       [dx]     Run the indicated unit test.
       [dx]   dx -J<option> ... <arguments, in one of the above forms>
       [dx]     Pass VM-specific options to the virtual machine that runs dx.
       [dx]   dx --version
       [dx]     Print the version of this tool (1.6).
       [dx]   dx --help
       [dx]     Print this message.

BUILD FAILED
C:\Program Files\Eclipse-sdk\android-sdk\tools\ant\build.xml:729: The following
error occurred while executing this line:
C:\Program Files\Eclipse-sdk\android-sdk\tools\ant\build.xml:731: The following
error occurred while executing this line:
C:\Program Files\Eclipse-sdk\android-sdk\tools\ant\build.xml:743: The following
error occurred while executing this line:
C:\Program Files\Eclipse-sdk\android-sdk\tools\ant\build.xml:249: null returned:
 1

i havent edited my build.xml file and main rule build.xml file is in C:\Program Files\Eclipse-sdk\android-sdk\tools\ant\build.xml. main rule is build.xml

how can i fix this error

Was it helpful?

Solution 3

ok i fixed it with the help of http://brettsdevblog.blogspot.com/2011/10/android-sdk-revision-13-pain.html it was all problems of android platform-tools which should have been updated

OTHER TIPS

you use the command to create the project android create project ..., may create a build.xml in your project, i think you don't need modify it, it work right.

Update android-tools and android-platform-tools using the android sdk manager.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top