Jetzt kostenlos registrieren. Mitglieder surfen ohne Werbung auf Android-Hilfe.de!
Zurück   Android-Hilfe.de > Android Developer > Android App Entwicklung

The application has stopped unexpectedly

Das Thema "The application has stopped unexpectedly" befindet sich unter Android App Entwicklung auf Android-Hilfe.de.


Antwort

 

Themen-Optionen Ansicht
Alt 17.08.2011, 11:06   #1 (permalink)
Neuer Benutzer

Registriert seit: 16.08.2011
Beiträge: 4
Abgegebene Danke: 2
Erhielt 0 Danke für 0 Beiträge
Standard The application has stopped unexpectedly

Hallo,

ich bin gerade dabei mich in die programmierung von Android "reinzufuchsen". Ich habe im Moment noch das Problem Fehler zu deuten.

Ich hoffe Jemand von euch könnte mir sagen wo der Fehler liegt.

Hier einmal der Code-Schnippsel, welcher wohl den Fehler verursacht:

Code:
    private void getLongLat(){
        final Geocoder geoCoder = new Geocoder(AndroidGPSTestActivity.this, Locale.GERMAN);
        try{
            List <Address> addresses = geoCoder.getFromLocationName("Kassel", 1);
            if(addresses.size() > 0){
                GeoPoint p = new GeoPoint(
                        (int) (addresses.get(0).getLatitude() * 1E6), 
                        (int) (addresses.get(0).getLongitude() * 1E6));

                Toast.makeText(AndroidGPSTestActivity.this, p.toString(), Toast.LENGTH_LONG).show();
            }else{
                Toast.makeText(AndroidGPSTestActivity.this, "Kein Ort!", Toast.LENGTH_LONG).show();
            }
        } catch(Exception e){
            Toast.makeText(AndroidGPSTestActivity.this, "Fehler", Toast.LENGTH_LONG).show();
        }            
    }
Der Fehler:

Code:
08-17 08:54:02.653: ERROR/AndroidRuntime(780): Uncaught handler: thread main exiting due to uncaught exception
08-17 08:54:02.673: ERROR/AndroidRuntime(780): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.javacodegeeks.android.lbs/com.javacodegeeks.android.lbs.AndroidGPSTestActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class java.lang.reflect.Constructor
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.os.Looper.loop(Looper.java:123)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.app.ActivityThread.main(ActivityThread.java:3948)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at java.lang.reflect.Method.invokeNative(Native Method)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at java.lang.reflect.Method.invoke(Method.java:521)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at dalvik.system.NativeStart.main(Native Method)
08-17 08:54:02.673: ERROR/AndroidRuntime(780): Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class java.lang.reflect.Constructor
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.view.LayoutInflater.createView(LayoutInflater.java:512)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:564)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:309)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.app.Activity.setContentView(Activity.java:1626)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at com.javacodegeeks.android.lbs.AndroidGPSTestActivity.onCreate(AndroidGPSTestActivity.java:36)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     ... 11 more
08-17 08:54:02.673: ERROR/AndroidRuntime(780): Caused by: java.lang.reflect.InvocationTargetException
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at com.google.android.maps.MapView.<init>(MapView.java:237)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at java.lang.reflect.Constructor.constructNative(Native Method)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at android.view.LayoutInflater.createView(LayoutInflater.java:499)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     ... 21 more
08-17 08:54:02.673: ERROR/AndroidRuntime(780): Caused by: java.lang.IllegalArgumentException: MapViews can only be created inside instances of MapActivity.
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at com.google.android.maps.MapView.<init>(MapView.java:281)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     at com.google.android.maps.MapView.<init>(MapView.java:254)
08-17 08:54:02.673: ERROR/AndroidRuntime(780):     ... 25 more
Wäre sehr dankbar wenn mir Jemand helfen könnte

Viele Grüße
Michael
daroxxxer ist offline   Mit Zitat antworten
Alt 17.08.2011, 11:26   #2 (permalink)
Android Guru

Modell: T-Mobile G1, Nexus One, Samsung Galaxy Tab 10.1, Samsung Galaxy Nexus

Registriert seit: 04.05.2009
Beiträge: 1.599
Abgegebene Danke: 128
Erhielt 210 Danke für 193 Beiträge
Standard AW: The application has stopped unexpectedly

Naja, die XML die du in der AndroidGPSTestActivity in der Methode onCreate in Zeile 36 setzt kann nicht eingelesen werden weil sie in Zeile 13 einen Fehler hat.
__________________
Follow/Add/Circle/Whatever me on Google+

Solitaire HD, ein Solitaire optimiert für Honeycomb.
the_alien ist offline   Mit Zitat antworten
Folgender Benutzer bedankt sich bei the_alien für diesen Beitrag:
daroxxxer (18.08.2011)
Alt 17.08.2011, 12:59   #3 (permalink)
Neuer Benutzer

Registriert seit: 16.08.2011
Beiträge: 4
Abgegebene Danke: 2
Erhielt 0 Danke für 0 Beiträge
Standard AW: The application has stopped unexpectedly

Danke.

Hatte einen Fehler in der Main.XML
daroxxxer ist offline   Mit Zitat antworten
Alt 17.08.2011, 20:10   #4 (permalink)
Android Guru

Modell: T-Mobile G1, Nexus One, Samsung Galaxy Tab 10.1, Samsung Galaxy Nexus

Registriert seit: 04.05.2009
Beiträge: 1.599
Abgegebene Danke: 128
Erhielt 210 Danke für 193 Beiträge
Standard AW: The application has stopped unexpectedly

Danke ist unten rechts...
__________________
Follow/Add/Circle/Whatever me on Google+

Solitaire HD, ein Solitaire optimiert für Honeycomb.
the_alien ist offline   Mit Zitat antworten
Folgender Benutzer bedankt sich bei the_alien für diesen Beitrag:
daroxxxer (18.08.2011)
Antwort

Stichworte
-

Themen-Optionen
Ansicht


Ähnliche Themen

Thema Autor Forum Antworten Letzter Beitrag
Alexgalaxys G3 Rom V 1.0 [Updates stopped!] Alexgalaxy Root / Hacking / Modding für Samsung Galaxy 3 98 02.05.2011 18:24
Sorry! The application Layout Tabs (prosess ...) has stopped unexpectedly. Bobert Android App Entwicklung 9 29.11.2010 10:14
the application has stopped unexpectedly monomicha Android App Entwicklung 12 02.10.2010 18:14
Afile Application ? Azteke Sonstige Apps & Widgets 4 26.12.2009 11:37
Google Mail has stopped unexpectedly. cyrex T-Mobile G1 Forum 2 15.02.2009 23:07




Du liest gerade: "The application has stopped unexpectedly" unter "Android App Entwicklung" auf Android-Hilfe.de.


Powered by vBulletin®
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
© Android-Hilfe.de 2012 - All rights reserved.