学《第一行代码》时可能会有以下报错
Activity supporting ACTION_VIEW is not set as BROWSABLE
此处添加一个intentChooser即可
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("http://www.baidu.com"));
startActivity(Intent.createChooser(intent,"Choose Application"));
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http"/>
</intent-filter>