我的示例无法在Android虚拟设备中启动

时间:2013-06-17 11:34:52

标签: android

我是android编程的新手。我只是一个表单,只有一个文本框和按钮。当我运行它时,我给出了一个错误,你可以在屏幕截图中看到。

enter image description here

我的manifest.xml位于下方。

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.deitel.welcome"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">
    <activity android:name="welcome" android:label="@string/app_name"
            android:theme="@android:style/Theme.Black.NoTitleBar"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>      

日志

[2013-06-17 14:40:38 - Welcome] ------------------------------
[2013-06-17 14:40:38 - Welcome] Android Launch!
[2013-06-17 14:40:38 - Welcome] adb is running normally.
[2013-06-17 14:40:38 - Welcome] Performing com.deitel.welcome.welcome activity launch
[2013-06-17 14:40:38 - Welcome] Automatic Target Mode: launching new emulator with compatible AVD 'emulator1'
[2013-06-17 14:40:38 - Welcome] Launching a new emulator with Virtual Device 'emulator1'
[2013-06-17 14:40:38 - Emulator] Failed to create Context 0x3005
[2013-06-17 14:40:38 - Emulator] could not get wglGetExtensionsStringARB
[2013-06-17 14:40:38 - Emulator] could not get wglGetExtensionsStringARB
[2013-06-17 14:40:38 - Emulator] could not get wglGetExtensionsStringARB
[2013-06-17 14:40:38 - Emulator] could not get wglGetExtensionsStringARB
[2013-06-17 14:40:38 - Emulator] could not get wglGetExtensionsStringARB
[2013-06-17 14:40:38 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2013-06-17 14:40:38 - Emulator] could not get wglGetExtensionsStringARB
[2013-06-17 14:40:38 - Emulator] could not get wglGetExtensionsStringARB
[2013-06-17 14:40:38 - Emulator] could not get wglGetExtensionsStringARB
[2013-06-17 14:40:39 - Welcome] New emulator found: emulator-5554
[2013-06-17 14:40:39 - Welcome] Waiting for HOME ('android.process.acore') to be launched...
[2013-06-17 14:41:25 - Welcome] HOME is up on device 'emulator-5554'
[2013-06-17 14:41:25 - Welcome] Uploading Welcome.apk onto device 'emulator-5554'
[2013-06-17 14:41:25 - Welcome] Installing Welcome.apk...
[2013-06-17 14:42:24 - Welcome] Success!
[2013-06-17 14:42:24 - Welcome] Starting activity com.deitel.welcome.welcome on device emulator-5554
[2013-06-17 14:42:26 - Welcome] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.deitel.welcome/.welcome }

1 个答案:

答案 0 :(得分:1)

这表明您的应用程序由于某种原因而崩溃。 在您的情况下调试您的Main Activity它是Welcome.java。将调试点放在onCreate和其他回调方法中,即onResume()onPuase(),还提供完整的堆栈跟踪,您提供的跟踪是无用的。请同时提供欢迎活动的代码。