Android Studio 出现Activity supporting ACTION_VIEW is not set as BROWSABLE错误

Android Studio 出现Activity supporting ACTION_VIEW is not set as BROWSABLE错误

木来 木来
 <activity android:name=".ThirdActivity">
     <intent-filter>
         <action android:name="android.intent.action.VIEW" />
 
         <category android:name="android.intent.category.DEFAULT" />
         <data android:scheme="http" />
     </intent-filter>
</activity>

初学者在学安卓的时候,在《第一行代码》中,出现:

Activity supporting ACTION_VIEW is not set as BROWSABLE less... (Ctrl+F1)
Inspection info:Ensure the URL is supported by your app, to get installs and traffic to your app from Google Search.

Issue id: AppLinkUrlError

More info: https://g.co/AppIndexing/AndroidStudio

需要再添加一个catagory:BROWSABLE

<activity android:name=".ThirdActivity">
     <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="http" />
     </intent-filter>
 </activity>
0 条评论