我使用Titanium sdk 3.5.1开发了一个Android应用程序。应用程序中使用的模块是: LocationServiceModele和PushSubscription模块。 问题是,在某些设备中,应用程序不断崩溃并重新启动应用程序.DDms中显示的错误是:
07-13 17:49:54.598: E/TiApplication(11402): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1194)
07-13 17:49:54.598: E/TiApplication(11402): at android.app.Activity.performStart(Activity.java:5258)
07-13 17:49:54.598: E/TiApplication(11402): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2171)
07-13 17:49:54.598: E/TiApplication(11402): ... 11 more
07-13 17:49:54.639: E/AndroidRuntime(11402): FATAL EXCEPTION: main
07-13 17:49:54.639: E/AndroidRuntime(11402): Process: com.qatartips, PID: 11402
07-13 17:49:54.639: E/AndroidRuntime(11402): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qatartips/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException
07-13 17:49:54.639: E/AndroidRuntime(11402): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198)
07-13 17:49:54.639: E/AndroidRuntime(11402): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
07-13 17:49:54.639: E/AndroidRuntime(11402): at android.app.ActivityThread.access$800(ActivityThread.java:139)
07-13 17:49:54.639: E/AndroidRuntime(11402): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
07-13 17:49:54.639: E/AndroidRuntime(11402): at android.os.Handler.dispatchMessage(Handler.java:102)
07-13 17:49:54.639: E/AndroidRuntime(11402): at android.os.Looper.loop(Looper.java:136)
07-13 17:49:54.639: E/AndroidRuntime(11402): at android.app.ActivityThread.main(ActivityThread.java:5086)
07-13 17:49:54.639: E/AndroidRuntime(11402): at java.lang.reflect.Method.invokeNative(Native Method)
07-13 17:49:54.639: E/AndroidRuntime(11402): at java.lang.reflect.Method.invoke(Method.java:515)
07-13 17:49:54.639: E/AndroidRuntime(11402): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
07-13 17:49:54.639: E/AndroidRuntime(11402): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
07-13 17:49:54.639: E/AndroidRuntime(11402): at dalvik.system.NativeStart.main(Native Method)
07-13 17:49:54.639: E/AndroidRuntime(11402): Caused by: java.lang.NullPointerException
07-13 17:49:54.639: E/AndroidRuntime(11402): at com.android.internal.policy.impl.PhoneWindow.updateProgressBars(PhoneWindow.java:1367)
07-13 17:49:54.639: E/AndroidRuntime(11402): at com.android.internal.policy.impl.PhoneWindow.onIntChanged(PhoneWindow.java:1322)
07-13 17:49:54.639: E/AndroidRuntime(11402): at com.android.internal.policy.impl.PhoneWindow.updateInt(PhoneWindow.java:3341)
07-13 17:49:54.639: E/AndroidRuntime(11402): at com.android.internal.policy.impl.PhoneWindow.setFeatureInt(PhoneWindow.java:1267)