我正在嘗試使用Eclipse運行Hello World教程代碼。我已經設置了AVD,但是當我嘗試運行代碼時,模擬器會加載到主屏幕,並且應用程序不會顯示。在控制檯中沒有顯示錯誤,並且logcat完全是空的(我也讓它運行了30分鐘)。Android應用程序不能在仿真器上運行
控制檯輸出:
[2011-09-28 18:00:31 - AndroidTest] ------------------------------
[2011-09-28 18:00:31 - AndroidTest] Android Launch!
[2011-09-28 18:00:31 - AndroidTest] adb is running normally.
[2011-09-28 18:00:31 - AndroidTest] Performing com.example.helloandroid.AndroidTest activity launch
[2011-09-28 18:00:31 - AndroidTest] Automatic Target Mode: launching new emulator with compatible AVD 'myAVD'
[2011-09-28 18:00:31 - AndroidTest] Launching a new emulator with Virtual Device 'myAVD'
代碼:
package com.example.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class AndroidTest extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello World!");
setContentView(tv);
}
}
我在Windows 7上運行64位。
謝謝。
你有一個完整的清單文件? – cjk
嘗試重新運行應用程序,一旦主屏幕可見(並且您解鎖了鍵鎖)。如果一個模擬器正在運行,你的應用程序將被部署到它而不是啓動一個新的。 – 2011-09-28 18:07:59