呵呵看了网上很多的东西,如果说你http://baidu 都加载不出来那是你的问题
如果百度加载的出来,自己的地址却加载不出来说明你的webview没有用对
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="chat.hpsvse.com.chattest.MainActivity">
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
对关键是这两句
WebView 的高度一定要写match_parent或者固定高度
如果你写wrap_content 不好意思自己把自己坑了