0

Ich deaktiviere die Schaltfläche "Öffnen", die nach der APK-Installation erscheint. Aber meine App öffnet sich danach nicht. Es gibt mir den Fehler 'Sorry nicht in der Lage, die Anwendung zu öffnen', nachdem ich versuche, es zu öffnen. Ich habe alle mögliche Lösung versucht, aber nichts funktioniert.Die App kann nicht geöffnet werden, wenn die Schaltfläche "Öffnen" nach der APK-Installation deaktiviert ist.

Vielen Dank im Voraus.

Manifest wie folgt:

<?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> 

Antwort

2

Sie müssen einen Fehler in der Intent-Filter gemacht haben. Versuchen Sie, Ihr <activity> Element durch dieses zu ersetzen:

<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>