Errors bei kleiner WebView App

F

Fabs44

Ambitioniertes Mitglied
1
Hallo Zusammen!

Ich habe eine kleine Webview app gemacht, doch es treten leider Errors auf, bei denen ich nicht weiß, wo der Fehler liegt.


In der Activity.xml:
Name des Fehler:
-Error parsing XML: unclosed token
-xml document structures must start and end within the same entity

HTML:
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/webview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
/>



.java Datei:
Fehler Name:
-webview cannot be resolved or is not a field

HTML:
public class ActivityName extends Activity {
	
	private WebView webview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_activity_name);
        
        webview = (WebView)findViewById (R.id.webview);
        webview.getSettings().setJavaScriptEnabled(true);
        webview.loadUrl("http://www.meine.url.de");
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_name, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}


Vielen Dank im Voraus!!

Ich bin für jeden Tipp dankbar!

LG Fabi:)

Der ursprüngliche Beitrag von 20:33 Uhr wurde um 22:29 Uhr ergänzt:

Hallo Zusammen!

Die Fehler waeen ploetzlich weg!

Sry das ich das gepostet habe :(

Lg Fabi :)
 

Ähnliche Themen

M
Antworten
3
Aufrufe
168
moin
M
Manny87
  • Manny87
Antworten
11
Aufrufe
166
swa00
swa00
R
  • Robby1950
2
Antworten
23
Aufrufe
1.022
Robby1950
R
Zurück
Oben Unten