D/dalvikvm( 2274): GC_CONCURRENT freed 206K, 12% free 6571K/7431K, paused 2ms+3ms
D/dalvikvm( 2274): GC_FOR_ALLOC freed 294K, 15% free 6603K/7751K, paused 26ms
I/dalvikvm( 2274): threadid=1: stack overflow on call to Landroid/util/SparseArray;.get:LIL
I/dalvikvm( 2274): method requires 28+20+16=64 bytes, fp is 0x50b1b31c (28 left)
I/dalvikvm( 2274): expanding stack end (0x50b1b300 to 0x50b1b000)
I/dalvikvm( 2274): Shrank stack (to 0x50b1b300, curFrame is 0x50b1b350)
D/AndroidRuntime( 2274): Shutting down VM
W/dalvikvm( 2274): threadid=1: thread exiting with uncaught exception (group=0x40b291f8)
D/OpenGLRenderer( 2286): Flushing caches (mode 0)
D/dalvikvm( 2274): GC_CONCURRENT freed 271K, 12% free 6886K/7815K, paused 2ms+3ms
E/AndroidRuntime( 2274): FATAL EXCEPTION: main
E/AndroidRuntime( 2274): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.phone/com.android.phone.InCallScreen}: android.view.InflateException: Binary XML file line #35: Error inflating class <unknown>
E/AndroidRuntime( 2274): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
E/AndroidRuntime( 2274): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
E/AndroidRuntime( 2274): at android.app.ActivityThread.access$600(ActivityThread.java:123)
E/AndroidRuntime( 2274): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
E/AndroidRuntime( 2274): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2274): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2274): at android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime( 2274): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2274): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2274): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 2274): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 2274): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 2274): Caused by: android.view.InflateException: Binary XML file line #35: Error inflating class <unknown>
E/AndroidRuntime( 2274): at android.view.LayoutInflater.createView(LayoutInflater.java:606)
E/AndroidRuntime( 2274): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.rInflate(LayoutInflater.java:742)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.parseInclude(LayoutInflater.java:823)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.rInflate(LayoutInflater.java:729)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
E/AndroidRuntime( 2274): at android.view.ViewStub.inflate(ViewStub.java:232)
E/AndroidRuntime( 2274): at com.android.phone.InCallScreen.initInCallScreen(InCallScreen.java:1223)
E/AndroidRuntime( 2274): at com.android.phone.InCallScreen.onCreate(InCallScreen.java:514)
E/AndroidRuntime( 2274): at android.app.Activity.performCreate(Activity.java:4465)
E/AndroidRuntime( 2274): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
E/AndroidRuntime( 2274): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
E/AndroidRuntime( 2274): ... 11 more
E/AndroidRuntime( 2274): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 2274): at java.lang.reflect.Constructor.constructNative(Native Method)
E/AndroidRuntime( 2274): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
E/AndroidRuntime( 2274): at android.view.LayoutInflater.createView(LayoutInflater.java:586)
E/AndroidRuntime( 2274): ... 26 more
E/AndroidRuntime( 2274): Caused by: java.lang.StackOverflowError
E/AndroidRuntime( 2274): at android.util.SparseArray.get(SparseArray.java:73)
E/AndroidRuntime( 2274): at android.content.res.StringBlock.get(StringBlock.java:69)
E/AndroidRuntime( 2274): at android.content.res.AssetManager.getResourceValue(AssetManager.java:201)
E/AndroidRuntime( 2274): at android.content.res.Resources.getValue(Resources.java:1015)
E/AndroidRuntime( 2274): at android.content.res.Resources.getDrawable(Resources.java:663)
E/AndroidRuntime( 2274): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
E/AndroidRuntime( 2274): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:867)
E/AndroidRuntime( 2274): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:804)
E/AndroidRuntime( 2274): at android.content.res.Resources.loadDrawable(Resources.java:1922)
E/AndroidRuntime( 2274): at android.content.res.Resources.getDrawable(Resources.java:664)
E/AndroidRuntime( 2274): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
E/AndroidRuntime( 2274): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:867)
E/AndroidRuntime( 2274): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:804)
E/AndroidRuntime( 2274): at android.content.res.Resources.loadDrawable(Resources.java:1922)
E/AndroidRuntime( 2274): at android.content.res.Resources.getDrawable(Resources.java:664)
E/AndroidRuntime( 2274): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
E/AndroidRuntime( 2274): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:867)
E/AndroidRuntime( 2274): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:804)
E/AndroidRuntime( 2274): at android.content.res.Resources.loadDrawable(Resources.java:1922)
E/AndroidRuntime( 2274): at android.content.res.Resources.getDrawable(Resources.java:664)
E/AndroidRuntime( 2274): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
E/AndroidRuntime( 2274): at andro
W/ActivityManager( 2148): Force finishing activity com.android.phone/.InCallScreen
D/dalvikvm( 2274): GC_CONCURRENT freed 460K, 15% free 6936K/8071K, paused 2ms+15ms
D/dalvikvm( 2148): GC_CONCURRENT freed 528K, 44% free 8313K/14599K, paused 4ms+6ms
W/ActivityManager( 2148): Activity pause timeout for ActivityRecord{41868ae0 com.android.phone/.InCallScreen}
I/power ( 2148): *** set_screen_state 1
W/PowerManagerService( 2148): App called preventScreenOn(true) but didn't promptly reenable the screen! Forcing the screen back on...
D/dalvikvm( 2229): GC_CONCURRENT freed 316K, 33% free 6270K/9223K, paused 1ms+4ms
W/ActivityManager( 2148): Activity destroy timeout for ActivityRecord{41868ae0 com.android.phone/.InCallScreen}
最近在移植android4.0.3时,在屏幕密度设为120时,出现Phone拨号挂死的情况,抓取log如上所示,google的时候发现有好多人月到同样的问题
我解决该问题的方法:
1.修改android4.0.3/packages/apps/Phone/res/layout/dialpad.xml
36行:把android:src="@drawable/dial_num_1_no_vm" 修改为 android:src="@drawable/dial_num_1"
81行:把android:src="@drawable/dial_num_0_no_plus" 修改为 android:src="@drawable/dial_num_0"
2.修改android4.0.3/packages/apps/Phone/res/drawable/
复制 dial_num_0_no_plus.xml, 修改为 dial_num_0.xml
复制 dial_num_1_no_vm.xml 修改为 dial_num_1.xml
3.打开 dial_num_0.xml,修改 android:drawable="@drawable/dial_num_0_no_plus_wht" 为 android:drawable="@drawable/dial_num_0_wht"
打开 dial_num_1.xml 修改 android:drawable="@drawable/dial_num_1_no_vm_wht" 为android:drawable="@drawable/dial_num_1_wht"
4. 我的屏幕分辨率是320*240,android系统默认调用的是图片是drawable-mdpi目录下的图片,所以修改drawable-mdpi目录下:
新复制 dial_num_0_no_plus_wht.png出来,修改复制后图片的名称为 dial_num_0_wht.png
新复制 dial_num_1_no_vm_wht.png出来,修改复制后图片的名称为 dial_num_1_wht.png
5.修改后重新编译该源码程序,我的机子上就没出现该应用程序挂死的情况,我的这种方法还没有找到最根本的原因,只是临时性的解决方法,由于我作android驱动的工作,对应用上面不是很懂!