02-20 13:57:58.601 5952-5952/com.counter.milion.milioncounter E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.counter.milion.milioncounter, PID: 5952
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.counter.milion.milioncounter/com.counter.milion.milioncounter.Menu}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2702)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:640)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:689)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:748)
at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:435)
at android.app.Activity.setContentView(Activity.java:2267)
at com.counter.milion.milioncounter.Menu.onCreate(Menu.java:35)
at android.app.Activity.performCreate(Activity.java:6289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:614)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:689)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:748)
at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:435)
at android.app.Activity.setContentView(Activity.java:2267)
at com.counter.milion.milioncounter.Menu.onCreate(Menu.java:35)
at android.app.Activity.performCreate(Activity.java:6289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: java.lang.OutOfMemoryError: Failed to allocate a 35389452 byte allocation with 16777216 free bytes and 32MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:726)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:547)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1014)
at android.content.res.Resources.loadDrawableForCookie(Resources.java:3730)
at android.content.res.Resources.loadDrawable(Resources.java:3603)
at android.content.res.TypedArray.getDrawable(TypedArray.java:762)
at android.view.View.<init>(View.java:3970)
at android.view.ViewGroup.<init>(ViewGroup.java:507)
at android.widget.LinearLayout.<init>(LinearLayout.java:199)
at android.widget.LinearLayout.<init>(LinearLayout.java:195)
at android.widget.LinearLayout.<init>(LinearLayout.java:191)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:614)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:689)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:748)
at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:435)
at android.app.Activity.setContentView(Activity.java:2267)
at com.counter.milion.milioncounter.Menu.onCreate(Menu.java:35)
at android.app.Activity.performCreate(Activity.java:6289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2655)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2767)
at android.app.ActivityThread.access$900(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1449)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5951)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
-5
gestoppt
A
Antwort
1
sind Sie android mit: onClick = "yourfunction" Funktion? Wenn ja überprüfen, ob Sie die richtige Aktivität in der Spitze Ihrer xml erklärten
tools:context="youractivity"
Dann sicher sein, die Funktion in Ihrer Klasse implementiert hat:
public void yourclick(View v){...}
1
Ihre Stack-Trace lesen sagt mir drei Dinge :
- Ihre Aktivität nicht geladen werden konnte, weil es nicht
- Ihre XML-Layout cou Aufpumpen des XML-Layout beenden konnte ldn't Finish aufblähenden, weil es nicht genügend Arbeitsspeicher lief, als ein Bitmap
Und schließlich zu schaffen versuchen, Ihre Antwort:
- Ihr XML-Layout versucht, entweder zu laden zu viele Bilder oder Bilder, die für den Ihrer Anwendung zugewiesenen Speicher zu groß sind.
Sie können dies in vielerlei Hinsicht beheben, aber am einfachsten:
- die Größe Ihrer Bilder verringern. (Normalerweise bedeutet das Auflösung.)
- Stellen Sie sicher, dass Sie nur die Bilder behalten, die Sie im Speicher benötigen. (Möglicherweise werden Bilder geladen, die nicht auf dem Bildschirm angezeigt werden.)
Ich hoffe, dies hilft.
+0
Vielen Dank, wenn Sie mir Ihre E-Mail senden möchten, habe ich eine andere Frage –
Verwandte Themen
- 1. android erkennen die letzten buttons klicken
- 2. Leider hat meine App in einer einfachen App gestoppt
- 3. iOS-App hat Verhalten geändert, nachdem auf appStore
- 4. Meine app sagt immer wieder "Leider hat app gestoppt"
- 5. Wie hat Google diese 3d Buttons erstellt?
- 6. Meine href Link Buttons funktionieren nicht online
- 7. Halten Sie meine Web-App ausgeführt, nachdem Browser schließen
- 8. Leider hat meine Webview App in Marshmallow gestoppt
- 9. App im AppStore manuell freigeben, nachdem Apple sie genehmigt hat
- 10. Meine Anwendung erhält weiterhin "Leider" Meine App "hat nach dem Ausführen der App"
- 11. Gibt es eine Möglichkeit zu überprüfen, ob der Benutzer, der meine App installiert hat, meine App wirklich installiert hat?
- 12. Radio Buttons in Netbeans
- 13. Wenn ich meine Taste Abstürze App klicken kann mir jemand
- 14. Buttons in Flowlayoutpanel
- 15. Facebook Account Kit Redirect in meine App
- 16. Android App abstürzt, nachdem Button
- 17. App hat Slugging Verhalten
- 18. Buttons in einem SlidingDrawer
- 19. Apple hat meine App aufgrund der Wiederherstellung IAP
- 20. iOS-Entwicklung: Hinzufügen eines "Add Friend" -Buttons in meiner App
- 21. Xcode6 Interface Builder hat meine Ansichten "versteckt"?
- 22. Wie zeige ich meine Benutzeroberfläche erst an, nachdem meine App initialisiert wurde?
- 23. Machen Sie Floating Action Buttons scrollen in Ionic 2 App
- 24. Meine X_App ist im Playstore, Wie werde ich erfahren, welcher Benutzer meine App installiert hat und welcher Benutzer meine App unter Android deinstalliert hat
- 25. Nachdem die LSUIElement-Agent-App Core-Daten aktualisiert hat, wie kann eine andere App benachrichtigt werden?
- 26. Buttons in Winkel 2
- 27. App stürzt beim Klicken auf App-Symbol
- 28. SlidingUpPanelLayout wird nicht bei Fortsetzen kollabieren, nachdem OS meine Aktivität beendet hat
- 29. Ausrichten Buttons in Bootstrap
- 30. Auslöser klicken, um typeahead zu aktivieren, nachdem das Element den Fokus erreicht hat
wo ist dein Code? –
Sie müssen dies neu formatieren, damit der Code ohne Scrollen sichtbar ist. Fügen Sie auch eine Erklärung Ihrer Absicht hinzu, was schief gelaufen ist und Ihre Frage – mickadoo