我正在 Android Studio 2.0 上开发 Android 应用程序。 我能够从工作室运行和调试我的应用程序,但在手机启动器应用程序列表中未显示该应用程序。我无法直接在手机上运行该应用程序。 为什么?
这是我的 list :
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivitySplash"
android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.VIEW" />
<data android:mimeType="vnd.android.cursor.item/vnd.myapp.profile" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
最佳答案
我找到了解决方案。 线条
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
应该在单独的 intent-filter 下 对于其他 Intent ,我必须打开另一个 intent-filter。
关于Android Studio 2.0,开发的app可调试但不显示在app drawer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35370226/