我已經下載了Android SDK工具。解壓縮文件,然後在目錄工具Android編譯失敗
./android update sdk --no-ui
./android create project --target 1 --name MyApp --path ./MyApp --activity MyAppActivity --package com.example.myapp
cd MyApp
ant debug
運行這些命令和得到這個錯誤:
BUILD FAILED /home/lived/devel/android/tools/MyApp/build.xml:90: The following error occurred while executing this line: /home/lived/devel/android/tools/ant/build.xml:108: taskdef A class needed by class com.android.ant.SignApkTask cannot be found: com.android.ant.SignApkTask using the classloader AntClassLoader[/home/lived/devel/android/tools/lib/anttasks.jar:/home/lived/devel/android/tools/lib/common.jar:/home/lived/devel/android/tools/lib/guava-tools.jar:/home/lived/devel/android/tools/lib/sdklib.jar:/home/lived/devel/android/tools/lib/layoutlib_api.jar:/home/lived/devel/android/tools/lib/commons-compress-1.0.jar:/home/lived/devel/android/tools/lib/httpclient-4.1.1.jar:/home/lived/devel/android/tools/lib/httpcore-4.1.jar:/home/lived/devel/android/tools/lib/httpmime-4.1.1.jar:/home/lived/devel/android/tools/lib/commons-logging-1.1.1.jar:/home/lived/devel/android/tools/lib/commons-codec-1.4.jar:/home/lived/devel/android/tools/lib/dvlib.jar:/home/lived/devel/android/tools/lib/manifmerger.jar]
系統信息:
[email protected]:~> cat /etc/SuSE-release
openSUSE 12.2 (x86_64)
VERSION = 12.2
CODENAME = Mantis
[email protected]:~> java -version
java version "1.7.0_09"
OpenJDK Runtime Environment (IcedTea7 2.3.3) (suse-3.16.1-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)
[email protected]:~> javac --version
javac (SUSE Linux) 4.7.1 20120723 [gcc-4_7-branch revision 189773]
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[email protected]:~> ant -version
Apache Ant(TM) version 1.8.2 compiled on June 23 2012
我錯過了什麼?
感謝