エミュレータでプロジェクトを実行しているときにEclipseとADTを使用していますが、画面が表示されません。ここで 私のコードです:ここではエミュレータでAndroidプロジェクトを実行しているときに画面が表示されない
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
// System.out.println("Hello");
tv.setText("Hello");
// setContentView(R.layout.main);
setContentView(tv);
}
はログです:ここでは
[2012-01-11 10:57:41 - HelloAndroid] ------------------------------
[2012-01-11 10:57:41 - HelloAndroid] Android Launch!
[2012-01-11 10:57:41 - HelloAndroid] adb is running normally.
[2012-01-11 10:57:41 - HelloAndroid] Performing com.tom.HelloAndroidActivity activity launch
[2012-01-11 10:57:45 - HelloAndroid] Launching a new emulator with Virtual Device 'cupcake'
[2012-01-11 10:57:46 - HelloAndroid] New emulator found: emulator-5554
[2012-01-11 10:57:46 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2012-01-11 10:59:06 - HelloAndroid] HOME is up on device 'emulator-5554'
[2012-01-11 10:59:06 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2012-01-11 10:59:09 - HelloAndroid] Installing HelloAndroid.apk...
[2012-01-11 10:59:55 - HelloAndroid] Success!
[2012-01-11 10:59:55 - HelloAndroid] Starting activity com.tom.HelloAndroidActivity on device emulator-5554
[2012-01-11 11:00:00 - HelloAndroid] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.tom/.HelloAndroidActivity }
情報が役立つかもしれないです:
E:\DevelopTool\Android\android-sdk_r15-windows\tools>android list targets
Available Android targets:
----------
id: 1 or "android-14"
Name: Android 4.0
Type: Platform
API level: 14
Revision: 3
Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W
XGA720, WXGA800
ABIs : armeabi-v7a
----------
id: 2 or "android-15"
Name: Android 4.0.3
Type: Platform
API level: 15
Revision: 1
Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, W
XGA720, WXGA800
ABIs : armeabi-v7a
E:\DevelopTool\Android\android-sdk_r15-windows\tools>android list avd
Available Android Virtual Devices:
Name: cupcake
Path: D:\Users\WE\.android\avd\cupcake.avd
Target: Android 4.0 (API level 14)
ABI: armeabi-v7a
Skin: WVGA800
---------
Name: Test
Path: D:\Users\WE\.android\avd\Test.avd
Target: Android 4.0 (API level 14)
ABI: armeabi-v7a
Skin: WVGA800
Sdcard: 8G
エミュレータ/シミュレータであり、あらゆる点で同じように動作します。画面のロックとロック解除の場合でも – Ghost