一个主题引发的惨案:
1.运来项目用的是一般的,然后想用个第三方库,得用v7,然后就用了,然后就闪退,然后就单独写了个空activity测了一把,崩了,然后各种百度测试,可是找到了,因为theme没用v7的,然后就只有下面的警告,啥错也没有的闪退啊。
04-07 17:10:12.102 13858-13858/? D/dalvikvm: Late-enabling CheckJNI
04-07 17:10:12.222 13858-13858/com.bdcj.jcj.chonggouupgrade I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
04-07 17:10:12.222 13858-13858/com.bdcj.jcj.chonggouupgrade W/dalvikvm: VFY: unable to resolve interface method 15929: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade W/dalvikvm: VFY: unable to resolve interface method 15931: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade W/dalvikvm: VFY: unable to resolve interface method 15935: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade W/dalvikvm: VFY: unable to resolve virtual method 524: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade W/dalvikvm: VFY: unable to resolve virtual method 546: Landroid/content/res/TypedArray;.getType (I)I
04-07 17:10:12.226 13858-13858/com.bdcj.jcj.chonggouupgrade D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
04-07 17:10:12.238 13858-13858/com.bdcj.jcj.chonggouupgrade D/AndroidRuntime: Shutting down VM
04-07 17:10:12.238 13858-13858/com.bdcj.jcj.chonggouupgrade W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x94c2eb20)
04-07 17:10:13.686 13858-13858/? I/Process: Sending signal. PID: 13858 SIG: 9
2.
v7
人家v7和一般的就是不一样,又气死宝宝,人家不需要“
android:”
。
<style name="AppTheme" parent="AppBaseTheme">
<item name="android:windowNoTitle">trueitem>
<item name="android:windowFullscreen">trueitem>
<item name="android:windowContentOverlay">@nullitem>
<item name="android:windowAnimationStyle">@style/No_Animationitem>
style>