05-08 13:32:01.783: E/AndroidRuntime(11658): FATAL EXCEPTION: main 05-08 13:32:01.783: E/AndroidRuntime(11658): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.gallery3d/com.android.gallery3d.app.Gallery}: android.view.InflateException: Binary XML file line #30: Error inflating class com.mediatek.gallery3d.ui.MavSeekBar 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2306) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2358) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.ActivityThread.access$600(ActivityThread.java:156) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.os.Handler.dispatchMessage(Handler.java:99) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.os.Looper.loop(Looper.java:153) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.ActivityThread.main(ActivityThread.java:5297) 05-08 13:32:01.783: E/AndroidRuntime(11658): at java.lang.reflect.Method.invokeNative(Native Method) 05-08 13:32:01.783: E/AndroidRuntime(11658): at java.lang.reflect.Method.invoke(Method.java:511) 05-08 13:32:01.783: E/AndroidRuntime(11658): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) 05-08 13:32:01.783: E/AndroidRuntime(11658): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) 05-08 13:32:01.783: E/AndroidRuntime(11658): at dalvik.system.NativeStart.main(Native Method) 05-08 13:32:01.783: E/AndroidRuntime(11658): Caused by: android.view.InflateException: Binary XML file line #30: Error inflating class com.mediatek.gallery3d.ui.MavSeekBar 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.createView(LayoutInflater.java:613) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:805) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 05-08 13:32:01.783: E/AndroidRuntime(11658): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:274) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.Activity.setContentView(Activity.java:1886) 05-08 13:32:01.783: E/AndroidRuntime(11658): at com.android.gallery3d.app.AbstractGalleryActivity.setContentView(AbstractGalleryActivity.java:143) 05-08 13:32:01.783: E/AndroidRuntime(11658): at com.android.gallery3d.app.Gallery.onCreate(Gallery.java:88) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.Activity.performCreate(Activity.java:5206) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2270) 05-08 13:32:01.783: E/AndroidRuntime(11658): ... 11 more 05-08 13:32:01.783: E/AndroidRuntime(11658): Caused by: java.lang.reflect.InvocationTargetException 05-08 13:32:01.783: E/AndroidRuntime(11658): at java.lang.reflect.Constructor.constructNative(Native Method) 05-08 13:32:01.783: E/AndroidRuntime(11658): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.view.LayoutInflater.createView(LayoutInflater.java:587) 05-08 13:32:01.783: E/AndroidRuntime(11658): ... 26 more 05-08 13:32:01.783: E/AndroidRuntime(11658): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/mavseekbar_progress_loading.xml from drawable resource ID #0x7f02014a 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.content.res.Resources.loadDrawable(Resources.java:1993) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.content.res.Resources.getDrawable(Resources.java:673) 05-08 13:32:01.783: E/AndroidRuntime(11658): at com.mediatek.gallery3d.ui.MavSeekBar.initializeDrawable(MavSeekBar.java:141) 05-08 13:32:01.783: E/AndroidRuntime(11658): at com.mediatek.gallery3d.ui.MavSeekBar.<init>(MavSeekBar.java:45) 05-08 13:32:01.783: E/AndroidRuntime(11658): ... 29 more 05-08 13:32:01.783: E/AndroidRuntime(11658): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f020191 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.content.res.Resources.getValue(Resources.java:1033) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.content.res.Resources.getDrawable(Resources.java:672) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:156) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:885) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:822) 05-08 13:32:01.783: E/AndroidRuntime(11658): at android.content.res.Resources.loadDrawable(Resources.java:1990) 05-08 13:32:01.783: E/AndroidRuntime(11658): ... 32 more 05-08 13:32:01.915: E/AppErrorDialog(526): Failed to get ILowStorageHandle instance 05-08 13:32:02.590: E/AEE/DUMPSTATE(11715): copy_process: execv /system/xbin/showmap failed(2), No such file or directory 05-08 13:32:03.229: E/AEE/DUMPSTATE(11713): copy_file: Copy /proc/gpulog to SYS_GPU_INFO failed(2), No such file or directory 05-08 13:32:04.609: E/AEE/DUMPSTATE(11720): copy_process: execv /system/xbin/procrank failed(2), No such file or directory 05-08 13:32:05.253: E/AEE/DUMPSTATE(11713): copy_file: Copy /proc/slabinfo to SYS_SLAB_INFO failed(2), No such file or directory 05-08 13:32:05.349: E/AEE/DUMPSTATE(11713): copy_file: Copy /sys/kernel/debug/wakeup_sources to SYS_KERNEL_WAKELOCKS failed(2), No such file or directory 05-08 13:32:05.455: E/AEE/DUMPSTATE(11727): copy_process: execv /system/xbin/librank failed(2), No such file or directory 05-08 13:32:05.648: E/AEE/DUMPSTATE(11735): copy_process: execv /system/xbin/proc_mem failed(2), No such file or directory
解决方法:
mavseekbar_progress_loading.xml文件中加载了几张图片,在drawable-mdpi中没有这几张图片,而编译时默认加载图片是drawable-mdpi下的。可以修改默认加载设置(在配置文件中将Density的值设为240?hdpi),或拷贝几张图片到drawable-mdpi下
(安装编译后的apk文件,发现不会重新编译,找个class文件敲个回车什么的修改下,再进行编译,或者删除已经编译好的class文件,再编译一次)