java - HoloColorsGenerator and ActionBarSherlock crashing -
here did:
- create new android project
- added actionbarsherlock
- added action bar color generator files
- tested application - running on 2.x , 4.x action bar colors
- create files through holo color generator
- added holo color generator files project
- did not change theme or anything. of right now, application should still run, didn't change themes in manifest or styles.
- tested application - tried running on 2.x , 4.x crashes every time
i don't understand how application can crashing if never set new styles/theme.
i same crash on every device version.
logcat:
07-23 23:32:31.942: e/androidruntime(13026): fatal exception: main 07-23 23:32:31.942: e/androidruntime(13026): java.lang.runtimeexception: unable start activity componentinfo{com.example.whatthe/com.example.whatthe.mainactivity}: android.view.inflateexception: binary xml file line #1: error inflating class android.widget.relativelayout 07-23 23:32:31.942: e/androidruntime(13026): @ android.app.activitythread.performlaunchactivity(activitythread.java:2180) 07-23 23:32:31.942: e/androidruntime(13026): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2230) 07-23 23:32:31.942: e/androidruntime(13026): @ android.app.activitythread.access$600(activitythread.java:141) 07-23 23:32:31.942: e/androidruntime(13026): @ android.app.activitythread$h.handlemessage(activitythread.java:1234) 07-23 23:32:31.942: e/androidruntime(13026): @ android.os.handler.dispatchmessage(handler.java:99) 07-23 23:32:31.942: e/androidruntime(13026): @ android.os.looper.loop(looper.java:137) 07-23 23:32:31.942: e/androidruntime(13026): @ android.app.activitythread.main(activitythread.java:5041) 07-23 23:32:31.942: e/androidruntime(13026): @ java.lang.reflect.method.invokenative(native method) 07-23 23:32:31.942: e/androidruntime(13026): @ java.lang.reflect.method.invoke(method.java:511) 07-23 23:32:31.942: e/androidruntime(13026): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:793) 07-23 23:32:31.942: e/androidruntime(13026): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:560) 07-23 23:32:31.942: e/androidruntime(13026): @ dalvik.system.nativestart.main(native method) 07-23 23:32:31.942: e/androidruntime(13026): caused by: android.view.inflateexception: binary xml file line #1: error inflating class android.widget.relativelayout 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.layoutinflater.createview(layoutinflater.java:613) 07-23 23:32:31.942: e/androidruntime(13026): @ com.android.internal.policy.impl.phonelayoutinflater.oncreateview(phonelayoutinflater.java:56) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.layoutinflater.oncreateview(layoutinflater.java:660) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:685) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.layoutinflater.inflate(layoutinflater.java:466) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.layoutinflater.inflate(layoutinflater.java:396) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.layoutinflater.inflate(layoutinflater.java:352) 07-23 23:32:31.942: e/androidruntime(13026): @ com.android.internal.policy.impl.phonewindow.setcontentview(phonewindow.java:270) 07-23 23:32:31.942: e/androidruntime(13026): @ com.actionbarsherlock.internal.actionbarsherlocknative.setcontentview(actionbarsherlocknative.java:134) 07-23 23:32:31.942: e/androidruntime(13026): @ com.actionbarsherlock.app.sherlockactivity.setcontentview(sherlockactivity.java:229) 07-23 23:32:31.942: e/androidruntime(13026): @ com.example.whatthe.mainactivity.oncreate(mainactivity.java:14) 07-23 23:32:31.942: e/androidruntime(13026): @ android.app.activity.performcreate(activity.java:5104) 07-23 23:32:31.942: e/androidruntime(13026): @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1080) 07-23 23:32:31.942: e/androidruntime(13026): @ android.app.activitythread.performlaunchactivity(activitythread.java:2144) 07-23 23:32:31.942: e/androidruntime(13026): ... 11 more 07-23 23:32:31.942: e/androidruntime(13026): caused by: java.lang.reflect.invocationtargetexception 07-23 23:32:31.942: e/androidruntime(13026): @ java.lang.reflect.constructor.constructnative(native method) 07-23 23:32:31.942: e/androidruntime(13026): @ java.lang.reflect.constructor.newinstance(constructor.java:417) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.layoutinflater.createview(layoutinflater.java:587) 07-23 23:32:31.942: e/androidruntime(13026): ... 24 more 07-23 23:32:31.942: e/androidruntime(13026): caused by: java.lang.unsupportedoperationexception: can't convert dimension: type=0x1 07-23 23:32:31.942: e/androidruntime(13026): @ android.content.res.typedarray.getdimensionpixelsize(typedarray.java:463) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.view.<init>(view.java:3340) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.view.<init>(view.java:3259) 07-23 23:32:31.942: e/androidruntime(13026): @ android.view.viewgroup.<init>(viewgroup.java:425) 07-23 23:32:31.942: e/androidruntime(13026): @ android.widget.relativelayout.<init>(relativelayout.java:210) 07-23 23:32:31.942: e/androidruntime(13026): ... 27 more
edit #1
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" tools:context=".mainactivity" > <textview android:id="@+id/textview2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /> <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textview2" android:layout_below="@+id/textview2" android:text="textview" /> <textview android:id="@+id/textview3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textview1" android:layout_below="@+id/textview1" android:text="large text" android:textappearance="?android:attr/textappearancelarge" /> <textview android:id="@+id/textview4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textview3" android:layout_below="@+id/textview3" android:text="medium text" android:textappearance="?android:attr/textappearancemedium" /> <textview android:id="@+id/textview5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textview4" android:layout_below="@+id/textview4" android:text="small text" android:textappearance="?android:attr/textappearancesmall" /> <button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentright="true" android:layout_aligntop="@+id/textview2" android:text="button" /> <button android:id="@+id/button2" style="?android:attr/buttonstylesmall" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignbaseline="@+id/textview4" android:layout_alignbottom="@+id/textview4" android:layout_alignleft="@+id/button1" android:text="button" /> <togglebutton android:id="@+id/togglebutton1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignright="@+id/button2" android:layout_below="@+id/textview5" android:text="togglebutton" /> <radiobutton android:id="@+id/radiobutton1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/textview5" android:layout_aligntop="@+id/togglebutton1" android:text="radiobutton" /> <checkbox android:id="@+id/checkbox1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/radiobutton1" android:layout_below="@+id/radiobutton1" android:text="checkbox" /> <checkedtextview android:id="@+id/checkedtextview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/checkbox1" android:layout_below="@+id/checkbox1" android:text="checkedtextview" /> <progressbar android:id="@+id/progressbar1" style="?android:attr/progressbarstylelarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignright="@+id/togglebutton1" android:layout_below="@+id/togglebutton1" /> <seekbar android:id="@+id/seekbar1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_below="@+id/progressbar2" /> <ratingbar android:id="@+id/ratingbar1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/seekbar1" android:layout_below="@+id/seekbar1" /> <spinner android:id="@+id/spinner1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/ratingbar1" android:layout_below="@+id/ratingbar1" /> <progressbar android:id="@+id/progressbar2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/checkedtextview1" android:layout_centervertical="true" /> </relativelayout>
Comments
Post a Comment