2017-07-12 2 views
3

Lorsque je choisis de télécharger Android apk-s zip apk-s à Google Play Developer Console, je reçois cette erreur: Le téléchargement a échoué. Vous devez utiliser les protocoles http et https pour les filtres d'intentionVous devez utiliser les protocoles http et https pour les filtres d'intention. Pourquoi recevoir ce message d'erreur?

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:tools="http://schemas.android.com/tools" 
     package="com.example.feature"> 

<application> 
    <meta-data 
     android:name="asset_statements" 
     android:resource="@string/asset_statements"/> 
    <activity android:name=".ui.MainActivity"> 
     <tools:validation testUrl="https://com.example/"/> 

     <intent-filter> 
      <action android:name="android.intent.action.MAIN"/> 

      <category android:name="android.intent.category.LAUNCHER"/> 
     </intent-filter> 
     <intent-filter 
      android:order="1" 
      android:autoVerify="true"> 
      <action android:name="android.intent.action.VIEW"/> 

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

      <data 
       android:scheme="https" 
       android:host="com.example" 
       android:pathPattern="/.*"/> 
     </intent-filter> 

     <meta-data 
      android:name="default-url" 
      android:value="https://com.example"/> 
    </activity> 
</application> 

+0

peut-être vous devriez utiliser http et https , pas seulement https? –

+0

Je ajoute mais la même erreur est reçue Hayk

Répondre

0

Assurez-vous que votre intent-filter a au moins les attributs suivants. Les deux système « http » et « https » doit être présent en même temps:

  <intent-filter 
      android:autoVerify="true" 
      android:order="1"> 
      <action android:name="android.intent.action.VIEW" /> 
      <category android:name="android.intent.category.BROWSABLE" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <data android:host="abc.com" /> 
      <data android:pathPattern="/def" /> 
      <data android:scheme="https" /> 
      <data android:scheme="http" /> 
     </intent-filter> 
1

J'avais ce problème jusqu'à ce que je changé mon AndroidManifest de cette façon

<activity android:name=".MainActivity"> 
    <intent-filter> 
     <action android:name="android.intent.action.MAIN" /> 
     <category android:name="android.intent.category.LAUNCHER" /> 
    </intent-filter> 
    <intent-filter android:autoVerify="true"> 
     <action android:name="android.intent.action.VIEW" /> 

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

     <data android:host="example.com" /> 
     <data android:scheme="http" /> 
     <data android:scheme="https" /> 
     <data android:pathPattern="/InstantApp" /> 
    </intent-filter> 
</activity>