0
我有一個自定義9修補程序鏡像爲我的微調。此圖片在我的手機上正常工作,但會導致摩托羅拉Xoom出現故障。這裏是堆棧跟蹤:自定義微調器9修補程序導致摩托羅拉Xoom崩潰
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): FATAL EXCEPTION: main
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.DealerLocatorActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class android.widget.Spinner
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1815)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1831)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.ActivityThread.access$500(ActivityThread.java:122)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1024)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.os.Handler.dispatchMessage(Handler.java:99)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.os.Looper.loop(Looper.java:132)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.ActivityThread.main(ActivityThread.java:4123)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at java.lang.reflect.Method.invokeNative(Native Method)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at java.lang.reflect.Method.invoke(Method.java:491)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at dalvik.system.NativeStart.main(Native Method)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.widget.Spinner
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.createView(LayoutInflater.java:596)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:644)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:223)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.Activity.setContentView(Activity.java:1786)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at com.example.myapp.DealerLocatorActivity.onCreate(DealerLocatorActivity.java:30)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.Activity.performCreate(Activity.java:4397)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1779)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): ... 11 more
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): Caused by: java.lang.reflect.InvocationTargetException
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at java.lang.reflect.Constructor.constructNative(Native Method)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at java.lang.reflect.Constructor.newInstance(Constructor.java:416)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.view.LayoutInflater.createView(LayoutInflater.java:576)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): ... 25 more
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): Caused by: java.lang.StackOverflowError
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.NinePatchDrawable.setNinePatchState(NinePatchDrawable.java:99)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.NinePatchDrawable.<init>(NinePatchDrawable.java:383)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.NinePatchDrawable.<init>(NinePatchDrawable.java:38)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.NinePatchDrawable$NinePatchState.newDrawable(NinePatchDrawable.java:373)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.content.res.Resources.getCachedDrawable(Resources.java:1972)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.content.res.Resources.loadDrawable(Resources.java:1873)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.content.res.Resources.getDrawable(Resources.java:655)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:832)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:769)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.content.res.Resources.loadDrawable(Resources.java:1903)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.content.res.Resources.getDrawable(Resources.java:655)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:832)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:769)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.content.res.Resources.loadDrawable(Resources.java:1903)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.content.res.Resources.getDrawable(Resources.java:655)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:832)
10-10 15:52:56.487: ERROR/AndroidRuntime(4187): at android.graphics.drawabl
這裏是在17行佈局:
<Spinner
android:id="@+id/spn_dealer_type"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_width="fill_parent"
style="@style/Widget.Spinner"></Spinner>
這裏是風格:
<style
name="Widget.Spinner"
parent="android:Widget">
<item
name="android:background">@drawable/spinner</item>
<item
name="android:clickable">true</item>
</style>
這裏是繪製:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:state_focused="true"
android:state_pressed="false"
android:drawable="@drawable/spinner_light" />
<item
android:state_focused="true"
android:state_pressed="true"
android:drawable="@drawable/spinner_dark" />
<item
android:state_focused="false"
android:state_pressed="true"
android:drawable="@drawable/spinner_dark" />
<item
android:drawable="@drawable/spinner" />
</selector>
正如我所說,這可以在手機上正常工作,但在Xoom上崩潰。任何想法有什麼不對?