由于<;数据:方案=";http「/&燃气轮机;在AndroidManifest.xml中
当我在AndroidManifest.xml中添加由于<;数据:方案=";http「/&燃气轮机;在AndroidManifest.xml中,android,android-manifest,android-launcher,Android,Android Manifest,Android Launcher,当我在AndroidManifest.xml中添加时,它会导致我的应用程序不再列在启动器中。为什么? AndroidManifest.xml不带: //将其添加到您的活动中 由于意向过滤器匹配/解析过程,当Android在启动器中“显示应用程序”时,它会使用匹配机制显示列表,当您添加应用程序时,它不匹配,因为系统在显示启动器时不会带来任何数据 解决方案是创建另一个意图过滤器,例如: <manifest xmlns:android="http://schemas.android.com/ap
时,它会导致我的应用程序不再列在启动器中。为什么?
AndroidManifest.xml
不带
:
//将其添加到您的活动中
由于意向过滤器匹配/解析过程,当Android在启动器中“显示应用程序”时,它会使用匹配机制显示列表,当您添加应用程序时,它不匹配,因为系统在显示启动器时不会带来任何数据
解决方案是创建另一个意图过滤器,例如:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ebookfrenzy.mywebview" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MyWebViewActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
</intent-filter>
</activity>
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ebookfrenzy.mywebview" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MyWebViewActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="http" />
</intent-filter>
</activity>
</application>
</manifest>
//Add this to your Activity
<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="@string/app_name" />
</intent-filter>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ebookfrenzy.mywebview" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MyWebViewActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
</intent-filter>
</activity>
</application>
</manifest>