android.view.InflateException: Binary XML file line #8: Error inflating class android.webkit.WebView?
layout:
android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:padding="3dip">
- Acivity
package com.example.fiz.myapphome;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.webkit.WebView;
import com.example.fiz.myapplication.R;
/**
Created by Fiz on 16/4/13.
显示文章详情页面
*/
public class ArticleInfoActivity extends AppCompatActivity {
private WebView webView_home_artilce_info; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.home_article_info);
// Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar_home_article_info);
// toolbar.setTitle("文章详细内容");
// toolbar.setSubtitle("文章详细内容 ");
// toolbar.setBackgroundColor(Color.parseColor("#303F9F"));
// toolbar.setNavigationIcon(R.drawable.ic_left);
//// webView_home_artilce_info = (WebView) findViewById(R.id.webView_home_article_info);
// init();
// toolbar.setNavigationOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// ArticleInfoActivity.this.finish();
// }
// });
webView_home_artilce_info = (WebView) findViewById(R.id.webview); webView_home_artilce_info.loadUrl(""); }
}
最后找到解决办法了就是简单的Clean project一下再重新编译就好了