简体   繁体   English

Android-重新启动电话后启动器应用程序中断

[英]Android - Launcher Application breaks after reboot phone

Here is my manifest: 这是我的清单:

<application
    android:allowBackup="true"
    android:icon="@drawable/toto"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:process=":app_process">
    <activity
        android:name=".core.Main"
        android:label="app_label"
        android:launchMode="singleTask"
        android:alwaysRetainTaskState="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <action android:name="android.nfc.action.TECH_DISCOVERED" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.HOME" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <meta-data
            android:name="android.nfc.action.TECH_DISCOVERED"
            android:resource="@xml/nfc_tech_filter" />
    </activity>

    <service android:name=".core.MessengerService"
        android:enabled="true"
        android:process=":app_process">
        <intent-filter>
            <action android:name="My_Messenger_Service"/>
        </intent-filter>
    </service>

    <receiver
        android:name=".core.BootReceiver"
        android:enabled="true"
        android:label="StartMyServiceAtBootReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
        </intent-filter>
    </receiver>

</application>

My launcher breaks after reboot phone, then the phone asks me to choose the default launcher which contains Android default launcher and my launcher. 重新启动电话后,我的启动器损坏,然后电话要求我选择默认启动器,其中包含Android默认启动器和我的启动器。

I tried to get logcat by using command line: 我尝试使用命令行获取logcat:

adb logcat -d > logcat.txt 

But I didn't find any error log E/ of my launcher. 但是我没有发现启动器的任何错误日志E /。 How can I trace this error? 如何追踪这个错误?

Can someone helps me pls? 有人可以帮我吗? Thanks, 谢谢,

我添加了这个参数,它起作用了

        android:clearTaskOnLaunch="true"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM