I just started a new appliction using android studio .. but i need to open a web page in my application i tried using web view but it doesnt worked out... when i open my app it crashes down
<WebView
android:id="@+id/web_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
and i included in java class file
private WebView wb;
@Override
protected void onCreate(Bundle savedInstanceState) {
wb=(WebView)findViewById(R.id.web_view);
WebSettings webSettings=wb.getSettings();
webSettings.setJavaScriptEnabled(true);
wb.loadUrl("http://ift.tt/Rvp0MX");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_references);
}
In manifest xml file i included
<uses-permission android:name="android.permission.INTERNET"/>
but still my app crashes pllzz help me
Aucun commentaire:
Enregistrer un commentaire