我创建了一个Android项目并在nexus 7(4.4.2)上进行了调试,一切正常,直到我在其他设备上尝试我的项目(三星galaxy s3和nexus 5)
这里出现了错误...希望有人可以帮助我,并建议制作一个兼容所有设备分辨率的用户界面
错误
06-06 15:47:40.605: W/ResourceType(25217): CREATING STRING CACHE OF 72 bytes
06-06 15:47:40.700: D/skia(25217): ---- fAsset->read(4) returned 0
06-06 15:47:40.700: D/skia(25217): ---- fAsset->read(3) returned 0
06-06 15:47:40.700: D/skia(25217): ---- fAsset->read(6) returned 0
06-06 15:47:40.700: D/skia(25217): ---- fAsset->read(64) returned 0
06-06 15:47:40.710: D/skia(25217): ---- fAsset->read(4) returned 0
06-06 15:47:40.710: D/skia(25217): ---- fAsset->read(1) returned 0
06-06 15:47:40.710: D/skia(25217): ---- fAsset->read(2) returned 0
06-06 15:47:40.710: D/skia(25217): --- SkImageDecoder::Factory returned null
06-06 15:47:40.715: D/skia(25217): ---- fAsset->read(4) returned 0
06-06 15:47:40.715: D/skia(25217): ---- fAsset->read(3) returned 0
06-06 15:47:40.715: D/skia(25217): ---- fAsset->read(6) returned 0
06-06 15:47:40.715: D/skia(25217): ---- fAsset->read(64) returned 0
06-06 15:47:40.715: D/skia(25217): ---- fAsset->read(4) returned 0
06-06 15:47:40.715: D/skia(25217): ---- fAsset->read(1) returned 0
06-06 15:47:40.715: D/skia(25217): ---- fAsset->read(2) returned 0
06-06 15:47:40.715: D/skia(25217): --- SkImageDecoder::Factory returned null
06-06 15:47:40.715: D/AndroidRuntime(25217): Shutting down VM
06-06 15:47:40.715: W/dalvikvm(25217): threadid=1: thread exiting with uncaught exception (group=0x417fdce0)
06-06 15:47:40.720: E/AndroidRuntime(25217): FATAL EXCEPTION: main
06-06 15:47:40.720: E/AndroidRuntime(25217): Process: com.example.salesdistributionprototype, PID: 25217
06-06 15:47:40.720: E/AndroidRuntime(25217): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.salesdistributionprototype/com.example.salesdistributionprototype.MainActivity}: java.lang.NullPointerException
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2215)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2265)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.app.ActivityThread.access$800(ActivityThread.java:145)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1206)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.os.Handler.dispatchMessage(Handler.java:102)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.os.Looper.loop(Looper.java:136)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.app.ActivityThread.main(ActivityThread.java:5081)
06-06 15:47:40.720: E/AndroidRuntime(25217): at java.lang.reflect.Method.invokeNative(Native Method)
06-06 15:47:40.720: E/AndroidRuntime(25217): at java.lang.reflect.Method.invoke(Method.java:515)
06-06 15:47:40.720: E/AndroidRuntime(25217): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
06-06 15:47:40.720: E/AndroidRuntime(25217): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
06-06 15:47:40.720: E/AndroidRuntime(25217): at dalvik.system.NativeStart.main(Native Method)
06-06 15:47:40.720: E/AndroidRuntime(25217): Caused by: java.lang.NullPointerException
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.support.v4.graphics.drawable.DrawableCompatKitKat.isAutoMirrored(DrawableCompatKitKat.java:30)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.support.v4.graphics.drawable.DrawableCompat$KitKatDrawableImpl.isAutoMirrored(DrawableCompat.java:74)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.support.v4.graphics.drawable.DrawableCompat.isAutoMirrored(DrawableCompat.java:133)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.support.v4.app.ActionBarDrawerToggle$SlideDrawable.<init>(ActionBarDrawerToggle.java:395)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.support.v4.app.ActionBarDrawerToggle$SlideDrawable.<init>(ActionBarDrawerToggle.java:385)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.support.v4.app.ActionBarDrawerToggle.<init>(ActionBarDrawerToggle.java:209)
06-06 15:47:40.720: E/AndroidRuntime(25217): at com.example.salesdistributionprototype.MainActivity$1.<init>(MainActivity.java:90)
06-06 15:47:40.720: E/AndroidRuntime(25217): at com.example.salesdistributionprototype.MainActivity.onCreate(MainActivity.java:93)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.app.Activity.performCreate(Activity.java:5231)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
06-06 15:47:40.720: E/AndroidRuntime(25217): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
06-06 15:47:40.720: E/AndroidRuntime(25217): ... 11 more