Android Studio-应用程序未安装在手机上,但可以运行

Android Studio-应用程序未安装在手机上,但可以运行,android,sdk,manifest,intentfilter,Android,Sdk,Manifest,Intentfilter,我使用Android Studio在手机上运行我的应用程序,运行良好。但应用程序本身从未安装过。。。 菜单中没有它的图标。每当我想测试我的应用程序时,我都必须“运行”。我的陈述没有错误 我相信我的舱单有问题。我做错了什么 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="jb854.eda

我使用Android Studio在手机上运行我的应用程序,运行良好。但应用程序本身从未安装过。。。 菜单中没有它的图标。每当我想测试我的应用程序时,我都必须“运行”。我的陈述没有错误

我相信我的舱单有问题。我做错了什么

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="jb854.eda.kent.ac.uk.edanews">

    <uses-feature
        android:name="android.software.leanback"
        android:required="false" />

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

    <application
        android:name=".EDANewsApplication"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name=".activity.MainActivity"
            android:windowSoftInputMode="adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>
                <data android:scheme="http" android:host="www.eda.kent.ac.uk" android:pathPrefix="/school/"/>
            </intent-filter>

        </activity>
        <activity
            android:name=".activity.CommentsActivity"
            android:theme="@style/AppTheme.TransparentActivity" />
        <activity
            android:name=".activity.ArticleActivity"
            android:theme="@style/AppTheme.TransparentActivity" />
        <activity
            android:name=".activity.FullscreenImageActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/title_activity_fullscreen_image"
            android:theme="@style/AppTheme.TransparentActivity" />
        <activity
            android:name=".activity.FavouritesActivity"
            android:label="@string/title_activity_favourites"
            android:theme="@style/AppTheme.TransparentActivity" />

    </application>
</manifest>

您应该将类别
启动器
和操作
MAIN
添加到您的
MAIN活动

<activity
    android:name=".activity.MainActivity"
    android:windowSoftInputMode="adjustResize">
    <intent-filter>
        <action android:name="android.intent.action.VIEW"/>
        <action android:name="android.intent.action.MAIN"/>

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

        <data android:scheme="http" android:host="www.eda.kent.ac.uk" android:pathPrefix="/school/"/>
    </intent-filter>

</activity>

我也遇到了同样的问题,因为android studio没有将这种依赖性放在build.gradle文件中:

compile 'com.android.support:support-v4:23.3.0'

不要使用直接调试apk文件手动安装。如果要通过复制存储中的APK文件手动安装,请

  • 删除位于
    /app/build/outputs/APK/debug/app debug.APK

  • 单击
    菜单>构建>构建APK
    。这将为您生成调试APK

  • 我正在使用Android Studio 3.0 Beta 7。这对我来说很有用。

    我的评论是错误的,对不起@布拉德利·威尔逊:谢谢你指出。你一开始把apk拖到手机上了吗?比如在没有Android Studio的情况下安装?我只能假设它只是在你的手机上调试,@xwhyliket这是一个默认图标,每个新的应用程序都会安装,这不会是问题。谢谢!这是一个非常令人困惑的问题,不客气。我看你是新来的。如果您觉得答案解决了问题,请单击绿色复选标记将其标记为“已接受”。这在我的情况下不起作用,因为我已经有了
    MAIN
    LAUNCHER
    ,所以它没有
    DEFAULT
    BROWSABLE
    。谢谢。在Android Studio 3.0(稳定版)上工作。