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

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

Activity supporting ACTION_VIEW is not set as BROWSABLE less... (Ctrl+F1)
Ensure the URL is supported by your app, to get installs and traffic to your app from Google Search. 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>

 

相关文章:

  • 2022-12-23
  • 2021-08-05
  • 2021-08-14
  • 2021-12-19
  • 2021-11-23
  • 2021-08-10
  • 2022-12-23
  • 2021-09-01
猜你喜欢
  • 2022-12-23
  • 2021-06-15
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案