framworks\base\core\res\res\values中arrays.xml 我自己添加了一个元素
- XML code
<array name="lockscreen_targets_has_4ways"> <item>@drawable/ic_lockscreen_send_sms_px</item> <item>@drawable/ic_lockscreen_camera_px</item> <item>@drawable/ic_lockscreen_call_xp</item> <item>@drawable/ic_lockscreen_unlock_px</item></array>
资源是都有了,编译也通过了, 生成的 frameworks-res.apk 放到手机里面 手机起不来各种错.求大神指点,是否增加了新的array元素在其他什么地方还要定义?或者这个arrays.xml有大小限制?
以下是报错log,顺便解释一下,我添加的array是android4.0中解锁的4个方向的解锁图案,源生的只有2种,但是我不想修改源生的,所以自己多添加了一个 array元素,编译通过,机器跑不起来.
06-16 10:13:44.181: E/(374): Can't open file for reading
06-16 10:13:44.181: E/(374): Can't open file for reading
06-16 10:13:44.191: W/dalvikvm(509): threadid=1: thread exiting with uncaught exception (group=0x40a851f8)
06-16 10:13:44.211: E/AndroidRuntime(509): FATAL EXCEPTION: main
06-16 10:13:44.211: E/AndroidRuntime(509): java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.NullPointerException: missing IConnectivityManager
06-16 10:13:44.211: E/AndroidRuntime(509): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2263)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.app.ActivityThread.access$1600(ActivityThread.java:123)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1201)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.os.Handler.dispatchMessage(Handler.java:99)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.os.Looper.loop(Looper.java:137)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.app.ActivityThread.main(ActivityThread.java:4424)
06-16 10:13:44.211: E/AndroidRuntime(509): at java.lang.reflect.Method.invokeNative(Native Method)
06-16 10:13:44.211: E/AndroidRuntime(509): at java.lang.reflect.Method.invoke(Method.java:511)
06-16 10:13:44.211: E/AndroidRuntime(509): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
06-16 10:13:44.211: E/AndroidRuntime(509): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
06-16 10:13:44.211: E/AndroidRuntime(509): at dalvik.system.NativeStart.main(Native Method)
06-16 10:13:44.211: E/AndroidRuntime(509): Caused by: java.lang.NullPointerException: missing IConnectivityManager
06-16 10:13:44.211: E/AndroidRuntime(509): at com.android.internal.util.Preconditions.checkNotNull(Preconditions.java:52)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.net.ConnectivityManager.<init>(ConnectivityManager.java:594)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.app.ContextImpl$8.createStaticService(ContextImpl.java:293)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.app.ContextImpl$StaticServiceFetcher.getService(ContextImpl.java:227)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.app.ContextImpl.getSystemService(ContextImpl.java:1188)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.content.ContextWrapper.getSystemService(ContextWrapper.java:386)
06-16 10:13:44.211: E/AndroidRuntime(509): at com.android.systemui.statusbar.policy.NetworkController.<init>(NetworkController.java:177)
06-16 10:13:44.211: E/AndroidRuntime(509): at com.android.systemui.statusbar.phone.PhoneStatusBar.makeStatusBarView(PhoneStatusBar.java:375)
06-16 10:13:44.211: E/AndroidRuntime(509): at com.android.systemui.statusbar.StatusBar.start(StatusBar.java:64)
06-16 10:13:44.211: E/AndroidRuntime(509): at com.android.systemui.statusbar.phone.PhoneStatusBar.start(PhoneStatusBar.java:264)
06-16 10:13:44.211: E/AndroidRuntime(509): at com.android.systemui.SystemUIService.onCreate(SystemUIService.java:93)
06-16 10:13:44.211: E/AndroidRuntime(509): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2253)