Creating a web browsing App for Android


Error is coming in setContentView(R.layout.activity_main); that activity_main cannot be resolved or is not a field.This is my code please check this and tell me why error is occuring?

import android.R; import android.os.Bundle; import android.annotation.SuppressLint; import; import android.view.Menu; import android.webkit.WebView; import android.webkit.WebViewClient;

public class MainActivity extends Activity {


protected void onCreate(Bundle savedInstanceState)

@SuppressLint(“SetJavaScriptEnabled”) @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(, menu);

    WebView myWebView = (WebView) findViewById(;
    myWebView.setWebViewClient(new WebViewClient());
      return true;