App runs well on other Android devices, only crashes when running on Samsung Galaxy Tab 2.
Thought it has something to do with unsupported ActionBarSherlock, so I've disabled all custom styles, didn't help.
Full stacktrace -
01-01 12:05:43.480: FATAL EXCEPTION: main
01-01 12:05:43.480: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mycompany.myapp/com.mycompany.MainActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class android.widget.TextView
01-01 12:05:43.480: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
01-01 12:05:43.480: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
01-01 12:05:43.480: at android.app.ActivityThread.access$600(ActivityThread.java:140)
01-01 12:05:43.480: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
01-01 12:05:43.480: at android.os.Handler.dispatchMessage(Handler.java:99)
01-01 12:05:43.480: at android.os.Looper.loop(Looper.java:137)
01-01 12:05:43.480: at android.app.ActivityThread.main(ActivityThread.java:4895)
01-01 12:05:43.480: at java.lang.reflect.Method.invokeNative(Native Method)
01-01 12:05:43.480: at java.lang.reflect.Method.invoke(Method.java:511)
01-01 12:05:43.480: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
01-01 12:05:43.480: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
01-01 12:05:43.480: at dalvik.system.NativeStart.main(Native Method)
01-01 12:05:43.480: Caused by: android.view.InflateException: Binary XML file line #26: Error inflating class android.widget.TextView
01-01 12:05:43.480: at android.view.LayoutInflater.createView(LayoutInflater.java:613)
01-01 12:05:43.480: at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-01 12:05:43.480: at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
01-01 12:05:43.480: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
01-01 12:05:43.480: at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
01-01 12:05:43.480: at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
01-01 12:05:43.480: at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-01 12:05:43.480: at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-01 12:05:43.480: at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-01 12:05:43.480: at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:306)
01-01 12:05:43.480: at com.actionbarsherlock.internal.ActionBarSherlockNative.setContentView(ActionBarSherlockNative.java:133)
01-01 12:05:43.480: at com.actionbarsherlock.app.SherlockActivity.setContentView(SherlockActivity.java:229)
01-01 12:05:43.480: at com.mycompany.myapp.MainActivity.onCreate(MainActivity.java:60)
01-01 12:05:43.480: at android.app.Activity.performCreate(Activity.java:5163)
01-01 12:05:43.480: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
01-01 12:05:43.480: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2061)
01-01 12:05:43.480: ... 11 more
01-01 12:05:43.480: Caused by: java.lang.reflect.InvocationTargetException
01-01 12:05:43.480: at java.lang.reflect.Constructor.constructNative(Native Method)
01-01 12:05:43.480: at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-01 12:05:43.480: at android.view.LayoutInflater.createView(LayoutInflater.java:587)
01-01 12:05:43.480: ... 26 more
01-01 12:05:43.480: Caused by: java.lang.NumberFormatException: Invalid int: "20.0dip"
01-01 12:05:43.480: at java.lang.Integer.invalidInt(Integer.java:138)
01-01 12:05:43.480: at java.lang.Integer.parse(Integer.java:375)
01-01 12:05:43.480: at java.lang.Integer.parseInt(Integer.java:366)
01-01 12:05:43.480: at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:123)
01-01 12:05:43.480: at android.content.res.TypedArray.getInt(TypedArray.java:254)
01-01 12:05:43.480: at android.widget.TextView.<init>(TextView.java:997)
01-01 12:05:43.480: at android.widget.TextView.<init>(TextView.java:562)
01-01 12:05:43.480: ... 29 more
Turns out it's a Samsung bug. There's an open bug, but hasn't been resolved yet.
It is caused by android:paddingStart="20dp"
in my layout XML. It will happen for paddingEnd
as well.
Samsung expects this value to be an int, thus throwing exception when trying to parse this value.
I've removed it and app loaded properly.