user1735856
user1735856

Reputation: 281

App Crashes suddenly crashes in debug-Mode see crash log

I´m working on a app-project, but suddenly it always crashes immediatly. I don´t know the reason. Here the crash log:

03-24 00:16:27.050: E/AndroidRuntime(533): FATAL EXCEPTION: main
03-24 00:16:27.050: E/AndroidRuntime(533): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lexoffice.android/com.lexoffice.android.Login}: android.view.InflateException: Binary XML file line #54: Error inflating class android.widget.Button
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.ActivityThread.access$600(ActivityThread.java:123)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.os.Handler.dispatchMessage(Handler.java:99)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.os.Looper.loop(Looper.java:137)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.ActivityThread.main(ActivityThread.java:4424)
03-24 00:16:27.050: E/AndroidRuntime(533):  at java.lang.reflect.Method.invokeNative(Native Method)
03-24 00:16:27.050: E/AndroidRuntime(533):  at java.lang.reflect.Method.invoke(Method.java:511)
03-24 00:16:27.050: E/AndroidRuntime(533):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
03-24 00:16:27.050: E/AndroidRuntime(533):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
03-24 00:16:27.050: E/AndroidRuntime(533):  at dalvik.system.NativeStart.main(Native Method)
03-24 00:16:27.050: E/AndroidRuntime(533): Caused by: android.view.InflateException: Binary XML file line #54: Error inflating class android.widget.Button
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.createView(LayoutInflater.java:606)
03-24 00:16:27.050: E/AndroidRuntime(533):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
03-24 00:16:27.050: E/AndroidRuntime(533):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.Activity.setContentView(Activity.java:1835)
03-24 00:16:27.050: E/AndroidRuntime(533):  at com.lexoffice.android.Login.onCreate(Login.java:21)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.Activity.performCreate(Activity.java:4465)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
03-24 00:16:27.050: E/AndroidRuntime(533):  ... 11 more
03-24 00:16:27.050: E/AndroidRuntime(533): Caused by: java.lang.reflect.InvocationTargetException
03-24 00:16:27.050: E/AndroidRuntime(533):  at java.lang.reflect.Constructor.constructNative(Native Method)
03-24 00:16:27.050: E/AndroidRuntime(533):  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.view.LayoutInflater.createView(LayoutInflater.java:586)
03-24 00:16:27.050: E/AndroidRuntime(533):  ... 26 more
03-24 00:16:27.050: E/AndroidRuntime(533): Caused by: android.content.res.Resources$NotFoundException: File res/layout/activity_login.xml from color state list resource ID #0x7f030000
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.content.res.Resources.loadColorStateList(Resources.java:2053)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.content.res.TypedArray.getColorStateList(TypedArray.java:342)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.widget.TextView.<init>(TextView.java:782)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.widget.Button.<init>(Button.java:108)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.widget.Button.<init>(Button.java:104)
03-24 00:16:27.050: E/AndroidRuntime(533):  ... 29 more
03-24 00:16:27.050: E/AndroidRuntime(533): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #2: invalid drawable tag ScrollView
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.content.res.ColorStateList.createFromXmlInner(ColorStateList.java:146)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.content.res.ColorStateList.createFromXml(ColorStateList.java:129)
03-24 00:16:27.050: E/AndroidRuntime(533):  at android.content.res.Resources.loadColorStateList(Resources.java:2050)
03-24 00:16:27.050: E/AndroidRuntime(533):  ... 33 more

Upvotes: 0

Views: 622

Answers (1)

David Manpearl
David Manpearl

Reputation: 12656

Your app is failing in onCreate() when it tries to access one of the Button objects defined in your XML file. In my experience, this failure is probably occurring in findViewById() when you are specifying the wrong resource id in your R.id.whatever value.

If everything checks out, often a complete refresh, clean, and rebuild can fix the problem.

Upvotes: 1

Related Questions