X
xCrasherr
Neues Mitglied
- 0
Hi, ich brauche Hilfe da ich den Fehler in meiner recht simplen Webview App einfach nicht finde..
Weder noch per Emulator noch über mein LG 4x HD funktionierts...
Bei meinem LG zeigt es an das es nicht kompatibel ist, anders als beim Emulator. Abstürzen tut die App bei beidem
Sie öffnet sich und schließt sich direkt mir der Meldung : App reagiert nicht
Fehler zeigt mir der Log wenn ich die ab run nicht an.
Hier der java Code der 'News' App
Hier der Coder aus der Activity :
und hier die Manifest :
Weder noch per Emulator noch über mein LG 4x HD funktionierts...
Bei meinem LG zeigt es an das es nicht kompatibel ist, anders als beim Emulator. Abstürzen tut die App bei beidem
Sie öffnet sich und schließt sich direkt mir der Meldung : App reagiert nicht
Fehler zeigt mir der Log wenn ich die ab run nicht an.
Hier der java Code der 'News' App
Code:
package com.gailtaler.app;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.os.Build;
import android.webkit.WebSettings;
import android.webkit.WebView;
public class News extends ActionBarActivity {
private WebView mWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_news);
// Enable Javascript
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
mWebView.loadUrl("http://www.xcrasherr.site90.net/index.xml");
mWebView = (WebView) findViewById(R.id.activity_main_webview);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.news, 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);
}
/**
* A placeholder fragment containing a simple view.
*/
public static class PlaceholderFragment extends Fragment {
public PlaceholderFragment() {
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_news, container, false);
return rootView;
}
}
}
Hier der Coder aus der Activity :
Code:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.gailtaler.app.News"
tools:ignore="MergeRootFrame" >
<WebView
android:id="@+id/activity_main_webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</FrameLayout>
und hier die Manifest :
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gailtaler.app" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.gailtaler.app.News"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>