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
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
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驅動的工作,對應用上面不是很懂!