我在Eclipse中寫了一個簡單的“hello world”程序,我在java文件中什麼都沒有加,只在main.xml 中加了text view ,像下邊這樣:
//main.xml文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World"
/>
</LinearLayout>
當我運行我的程序的時候,它在控制台顯示如下邊的錯誤:
//控制台輸出
[2012-09-12 07:10:22 - demo] ------------------------------
[2012-09-12 07:10:22 - demo] Android Launch!
[2012-09-12 07:10:24 - demo] adb is running normally.
[2012-09-12 07:10:24 - demo] Performing com.demo.DemoActivity activity launch
[2012-09-12 07:10:25 - demo] Automatic Target Mode: launching new emulator with compatible AVD 'vishal'
[2012-09-12 07:10:25 - demo] Launching a new emulator with Virtual Device 'vishal'
[2012-09-12 07:11:06 - Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
[2012-09-12 07:11:07 - Emulator] Hint: use '@foo' to launch a virtual device named 'foo'.
[2012-09-12 07:11:07 - Emulator] please use -help for more information
//--------------------------------------------------------------------------------/
這表明,因為一些原因我的ACD無法啟動,我應該怎麼做才能解決這個問題?
在Eclipse中,如果你的SDK路徑是 C:\Program Files (x86)\ ,把它改成C:\PROGRA~2.
如果你的系統是windows32位, C:\Program Files\,改變路徑到C:\PROGRA~1.