Android Studio 出現Activity supporting ACTION_VIEW is not set as BROWSABLE錯誤


1 <activity android:name=".ThirdActivity">
2     <intent-filter>
3         <action android:name="android.intent.action.VIEW" />
4 
5         <category android:name="android.intent.category.DEFAULT" />
6         <data android:scheme="http" />
7     </intent-filter>
8 </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

1 <activity android:name=".ThirdActivity">
2     <intent-filter>
3         <action android:name="android.intent.action.VIEW" />
4 
5         <category android:name="android.intent.category.DEFAULT" />
6         <category android:name="android.intent.category.BROWSABLE"/>
7         <data android:scheme="http" />
8     </intent-filter>
9 </activity>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM