Android应用程序没有显示

时间:2015-08-24 17:46:32

标签: android android-emulator apk

我正在开发一个Android应用程序,我正在模拟器上测试它。 最近,我得到了一个奇怪的行为,我启动了我的应用程序,它似乎已经启动但是活动没有出现。

我使用活动MainActivity启动我的应用程序,该活动位于com.mypackage.myapp包中。

在我的logcat中,我有以下消息

    08-24 17:31:30.578: I/ActivityManager(1116): 2353 START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.mypackage/.myapp.activities.MainActivity} from pid 1546
08-24 17:31:30.638: D/PermissionCache(915): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (70 us)
08-24 17:31:30.638: I/dalvikvm(916): Starting: com.mypackage with UID: 10018
08-24 17:31:30.638: I/AppDB(916): App database successfully initialized
08-24 17:31:30.638: D/AndroidRuntime(1546): Shutting down VM
08-24 17:31:30.638: D/dalvikvm(1546): GC_CONCURRENT freed 100K, 77% free 481K/2048K, paused 0ms+0ms
08-24 17:31:30.638: W/WindowManager(1116): Failure taking screenshot for (306x489) to layer 21005
08-24 17:31:30.648: D/jdwp(1546): Got wake-up signal, bailing out of select
08-24 17:31:30.648: D/dalvikvm(1546): Debugger has detached; object registry had 1 entries
08-24 17:31:30.658: D/dalvikvm(916): Executing: "/system/bin/ndc fw connect 10018 com.mypackage"
08-24 17:31:30.658: I/AndroidRuntime(1546): NOTE: attach of thread 'Binder Thread #3' failed
08-24 17:31:30.658: D/NetD(1556): NETD command: fw connect 10018 com.mypackage
08-24 17:31:30.658: I/FWController(912): App(com.mypackage): already connected
08-24 17:31:30.658: D/dalvikvm(1557): Not late-enabling CheckJNI (already on)
08-24 17:31:30.658: I/ActivityManager(1116): Start proc com.mypackage for activity com.mypackage/.myapp.activities.MainActivity: pid=1557 uid=10018 gids={3003}
08-24 17:31:30.668: D/dalvikvm(1116): GREF has increased to 401
08-24 17:31:31.508: I/MainActivity(1557): Prepayment
08-24 17:31:31.508: W/WindowManager(1116): Failure taking screenshot for (306x489) to layer 21010

我似乎无法找到问题的来源。 奇怪的是应用程序继续运行,我可以看到我在应用程序正常运行时设置的日志消息。

这是我的清单文件:

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mypackage"
    android:versionCode="19"
    android:versionName="2.2.0" >

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

    <uses-permission android:name="android.permission.INTERNET" />


    <application
        android:name=".MyApplication"
        android:allowBackup="true"
        android:icon="@drawable/image"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar" >

        <activity
            android:name=".myapp.activities.AwardActivity"
            android:label="@string/title_activity_discount" >
        </activity>
        <activity
            android:name=".myapp.activities.EnrollmentActivity"
            android:label="@string/title_activity_enrollment" >
        </activity>
        <activity
            android:name=".myapp.activities.ErrorActivity"
            android:label="@string/title_activity_error" >
        </activity>

         <activity
            android:name=".myapp.activities.LocalDialogActivity"
            android:label="@string/title_activity_local_dialog" >
        </activity>

        <activity
            android:name=".myapp.activities.LoyaltyActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        </activity>


    </application>

</manifest>

欢迎任何想法。

0 个答案:

没有答案