为什么我的应用程序无法启动或查看App菜单?

时间:2017-11-27 07:42:51

标签: android

我有问题。 我生成并安装了已签名的apk但是 我无法启动应用程序安装,我无法在应用程序菜单中看到它。 我只能在设置应用菜单中看到它。 为什么我看不到或开始? 该应用程序可以通过调试器启动。 你能救我吗?

操作系统是Android 7和5。

这是我的宣言:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.xxxxxx"
android:versionCode="12"
android:versionName="4.0.0">

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CLEAR_APP_CACHE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
<uses-permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<uses-feature
    android:name="android.hardware.camera"
    android:required="true" />
<uses-feature
    android:name="android.hardware.camera.front"
    android:required="true" />
<uses-feature
    android:name="android.hardware.camera.autofocus"
    android:required="false" />
<uses-feature
    android:name="android.hardware.camera.flash"
    android:required="false" />
<uses-feature
    android:name="android.hardware.screen.portrait"
    android:required="true" />
<uses-feature
    android:name="android.hardware.wifi"
    android:required="false" />
<uses-feature
    android:name="android.hardware.touchscreen"
    android:required="true" />

<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:xlargeScreens="true" />

<application
    android:name="com.control.xxxx.xxxxx"
    android:allowBackup="true"
    android:hardwareAccelerated="false"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:largeHeap="true"
    android:persistent="true"
    android:theme="@style/AppTheme">

    <!-- Activities -->
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <action android:name="android.nfc.action.NDEF_DISCOVERED"/>

            <category android:name="android.intent.category.DEFAULT"/>

            <data android:mimeType="text/plain"/>

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".ScannerActivity"
        android:label="@string/title_activity_qrcode_scanner"
        android:noHistory="true"
        android:screenOrientation="portrait" />
    <activity
        android:name=".HelpActivity"
        android:label="@string/help_title"
        android:noHistory="true"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Holo" />
    <activity
        android:name="com.control.installation.ConfigActivity"
        android:label="@string/install_title"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Holo"
        android:windowSoftInputMode="stateHidden|adjustPan" />
    <activity
        android:name=".CameraHideActivity"
        android:label="@string/title_activity_camera_hide"
        android:noHistory="true"
        android:screenOrientation="portrait" />
    <activity
        android:name=".ProjectListActivity"
        android:label="@string/title_activity_project_list"
        android:noHistory="true"
        android:screenOrientation="portrait" />
    <activity
        android:name="com.control.camerahidetexts.CamHideConfiguratorActivity"
        android:label="@string/title_config_hideactivity"
        android:noHistory="true"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.DeviceDefault.Dialog" />
    <activity
        android:name="com.control.personalmessages.PersMsgActivity"
        android:label="@string/pm_title"
        android:noHistory="true"
        android:screenOrientation="portrait" />
    <activity
        android:name="com.control.language.LanguageActivity"
        android:label="@string/title_languageactivity"
        android:noHistory="true"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.DeviceDefault.Dialog" />

    <activity
        android:name=".ButtonActivity"
        android:label="@string/button_settings"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Holo" />

    <!-- Receivers -->
    <receiver android:name="com.control.personalmessages.PersMsgReceiver" />
    <receiver android:name="com.control.broadcastreceiver.AppRestartReceiver" />
    <receiver android:name="com.control.camerahidetexts.CamHideConfigTextsReceiver" />
    <receiver android:name="com.control.livepackets.LivepaketReceiver" />
    <receiver android:name="com.control.projecttransponderlists.ListUpdateReceiver" />
    <receiver android:name="com.control.timestamps.TimestampReceiver" />
    <receiver android:name="com.control.projecttransponderlists.ListUpdateDoneReceiver" />
    <receiver android:name="com.control.log.LogReceiver" />
    <receiver android:name="com.control.broadcastreceiver.BootUpReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </receiver>

    <!-- Services -->
    <service android:name="com.control.personalmessages.SetPersonalMessagesToReadService" />
    <service android:name="com.control.personalmessages.DownloadPersMsgService" />
    <service android:name="com.control.personalmessages.FinishPMDownloadService" />
    <service android:name="com.control.camerahidetexts.CamHideConfigTextsService" />
    <service android:name="com.control.projecttransponderlists.ProjectListService" />
    <service android:name="com.control.projecttransponderlists.TransponderListService" />
    <service android:name="com.control.projecttransponderlists.LinkTransponderProjectListService" />
    <service android:name="com.control.projecttransponderlists.ListUpdateService" />
    <service android:name="com.control.projecttransponderlists.ListUpdateDoneService" />
    <service android:name="com.control.timestamps.TimestampService" />
    <service android:name="com.control.log.LogSendService" />
    <service android:name="com.control.livepackets.LivepaketService" />

</application>

更新 我发现了问题,它是android:mimeType但为什么? 你能解释一下吗?

1 个答案:

答案 0 :(得分:1)

您可能忘记了启动模式。在应用程序元素

中的AndroidManifest.xml中写下这个
<activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>

将.MainActivity替换为您的活动名称