D
DonnerBalken1
Neues Mitglied
- 1
hi ich hab ne frage und zwar wenn ich meine app starte kommt immer :
The application ....(process ...)has stopped unexpectedly.Please try again!
wie fixe ich den error?
activity:
package Crocos.Stauf;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.net.Uri;
import android.content.Intent;
public class CrocosActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
private void goToUrl(String Url){
Uri uriUrl = Uri.parse(Url);
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
}
public void goToJuS(View view){
goToUrl("http://www.briv-online.de/team/128/liga/205/");
}
public void goToJuT(View viewI){
goToUrl("http://www.briv-online.de/liga/205/tabelle/");
}
public void goToHIS(View viewII){
goToUrl("http://www.briv-online.de/team/124/liga/199/");
}
public void goToHIT(View viewIII){
goToUrl("http://www.briv-online.de/liga/199/tabelle/");
}
public void goToHIIS(View viewIV){
goToUrl("http://www.briv-online.de/team/138/liga/201/");
}
public void goToHIIT(View viewV){
goToUrl("http://www.briv-online.de/liga/201/tabelle/");
}
main.xml :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
androidrientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="10dp"
android:text="@string/Herren1"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToHIS"
android:text="@string/h11" />
<Button
android:id="@+id/button4"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToHIT"
android:text="@string/h12" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="10dp"
android:text="@string/Herren2"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToHIIS"
android:text="@string/h21" />
<Button
android:id="@+id/button5"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToHIIT"
android:text="@string/h22" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="20dp"
android:text="@string/Jugend"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/button3"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToJuS"
android:text="@string/j11" />
<Button
android:id="@+id/button6"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToJuT"
android:text="@string/j12" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:layout_marginTop="40dp"
android:text="@string/briv"
android:textAppearance="?android:attr/textAppearanceSmall" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_vertical" />
</LinearLayout>
Log:
06-23 12:26:46.312: E/AndroidRuntime(582): ... 20 more
außerdem möchte ich noch ein hintergrundbild für die app einfügen
wie geht das?
sorry wenn das problem simpel zu lösen ist aber ich bin neu hier^^
Danke für eure Hilfe!
MFG
The application ....(process ...)has stopped unexpectedly.Please try again!
wie fixe ich den error?
activity:
package Crocos.Stauf;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.net.Uri;
import android.content.Intent;
public class CrocosActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
private void goToUrl(String Url){
Uri uriUrl = Uri.parse(Url);
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
}
public void goToJuS(View view){
goToUrl("http://www.briv-online.de/team/128/liga/205/");
}
public void goToJuT(View viewI){
goToUrl("http://www.briv-online.de/liga/205/tabelle/");
}
public void goToHIS(View viewII){
goToUrl("http://www.briv-online.de/team/124/liga/199/");
}
public void goToHIT(View viewIII){
goToUrl("http://www.briv-online.de/liga/199/tabelle/");
}
public void goToHIIS(View viewIV){
goToUrl("http://www.briv-online.de/team/138/liga/201/");
}
public void goToHIIT(View viewV){
goToUrl("http://www.briv-online.de/liga/201/tabelle/");
}
main.xml :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LinearLayout2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
androidrientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="10dp"
android:text="@string/Herren1"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToHIS"
android:text="@string/h11" />
<Button
android:id="@+id/button4"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToHIT"
android:text="@string/h12" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="10dp"
android:text="@string/Herren2"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToHIIS"
android:text="@string/h21" />
<Button
android:id="@+id/button5"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToHIIT"
android:text="@string/h22" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginTop="20dp"
android:text="@string/Jugend"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/button3"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToJuS"
android:text="@string/j11" />
<Button
android:id="@+id/button6"
style="?android:attr/buttonStyleSmall"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_gravity="left"
androidnClick="goToJuT"
android:text="@string/j12" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal" />
<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_horizontal"
android:layout_marginTop="40dp"
android:text="@string/briv"
android:textAppearance="?android:attr/textAppearanceSmall" />
<Space
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="fill_vertical" />
</LinearLayout>
Log:
06-23 12:26:46.312: E/AndroidRuntime(582): ... 20 more
außerdem möchte ich noch ein hintergrundbild für die app einfügen
wie geht das?
sorry wenn das problem simpel zu lösen ist aber ich bin neu hier^^
Danke für eure Hilfe!
MFG