0

我正在禁用APK安装后出现的“打开”按钮。但是我的应用程序在它之后没有打开。在我尝试打开它后,它给了我错误“抱歉无法打开应用程序”。我尝试了所有可能的解决方案,但没有成功安装APK后禁用打开按钮时无法打开应用程序

在此先感谢。

清单如下:

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

<uses-sdk 
    android:minSdkVersion="14" 
    android:targetSdkVersion="21" /> 

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 
<uses-permission android:name="android.permission.GET_TASKS"/> 

<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme"> 
    <activity 
     android:name=".MainActivity" 
     android:label="@string/app_name" > 
     <intent-filter> 
     <action android:name="android.intent.action.MAIN"> 
     <category android:name="android.intent.category.LAUNCHER"/> 
     <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="callback" android:host="com.example.activity"/> 
       </category> 
      </category> 
      </action> 
     </intent-filter> 
     </action> 
    </intent-filter> 

    </activity> 

</application> 

</manifest> 

回答

2

您必须已在你的意图过滤器是错误的。尝试用此替换您的<activity>元素:

<activity 
    android:name=".MainActivity" 
    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"> 
     <category android:name="android.intent.category.BROWSABLE"> 
     <data android:scheme="callback" android:host="com.example.activityname"/> 
    </intent-filter> 
</activity> 
相关问题