2012-01-18 68 views
3

使classes.dex我只是單純地創建了使用錯誤而使用Ant

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

創建所有必要的文件的Android項目,但是當我試圖建立與

ant release 

命令 我獲得以下錯誤

-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 

我還沒有編輯我的build.xml文件主要規則build.xml文件在C:\Program Files\Eclipse-sdk\android-sdk\tools\ant\build.xml。主要法則是build.xml

我怎麼能

+0

thnaks大家 – sanu 2012-01-18 11:08:05

回答

0

您使用命令來創建項目android create project ...,可以在項目中創建一個build.xml,我覺得你並不需要修改它,它的工作解決這個錯誤對。

+0

的android平臺的工具,所有的問題,但它不能正常工作,同時創造DEX文件時,它拋出錯誤.. – sanu 2012-01-18 08:26:45

0

更新android-toolsandroid-platform-tools使用android sdk管理器。