Error in Activity2 of exercise of course android studio

0

I am following the exercises of an Android Studio course. The exercise that gives me an error is about two screens. In the first one a website address is entered and in the second one the site should appear.

When I run it, it only gives me an error that I can not solve.

This is the java code of Activity2:

package com.example.manuelreixach.proyecto112;

import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.os.Bundle;
import android.webkit.WebView;
import android.view.Menu;
import android.view.MenuItem;



public class Actividad2 extends AppCompatActivity {
     private WebView webView1;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_actividad2);


         webView1=(WebView)findViewById(R.id.webView);    Error:(21, 49) error: cannot find symbol variable webView

        Bundle bundle = getIntent().getExtras();
        String dato = bundle.getString("direccion");
        webView1.loadUrl("http://" + dato);
    }

    //public void onClick(View view) {
    //  Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
    //        .setAction("Action", null
    // Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    //setSupportActionBar(toolbar);

    //FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    //fab.setOnClickListener(new View.OnClickListener() {
    //  @Override).show();
    public void finalizar(View v) {
        finish();
    }
}
    
asked by Abuelo 27.05.2017 в 17:20
source

0 answers