我做了一個基於電話系統的相關項目。 它在任何三星android系列,HTC和摩托羅拉都能正常工作。 但問題是,當我試圖在索尼愛立信Android中運行它時,我甚至在每次打開應用程序時都會關閉它。第一次運行後強行關閉
(1st time i open the application it works fine,2nd time open,getting force close....3rd time open, 4th time force close... repeated....)
這是我的logcat
08-29 16:53:03.346: E/AndroidRuntime(5812): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.excel.extel/com.excel.extel.ExtelMain}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.excel.extel/com.excel.extel.DialerTab}: android.view.InflateException: Binary XML file line #83: Error inflating class <unknown>
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread.access$1500(ActivityThread.java:121)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.os.Handler.dispatchMessage(Handler.java:99)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.os.Looper.loop(Looper.java:123)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread.main(ActivityThread.java:3701)
08-29 16:53:03.346: E/AndroidRuntime(5812): at java.lang.reflect.Method.invokeNative(Native Method)
08-29 16:53:03.346: E/AndroidRuntime(5812): at java.lang.reflect.Method.invoke(Method.java:507)
08-29 16:53:03.346: E/AndroidRuntime(5812): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:862)
08-29 16:53:03.346: E/AndroidRuntime(5812): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
08-29 16:53:03.346: E/AndroidRuntime(5812): at dalvik.system.NativeStart.main(Native Method)
08-29 16:53:03.346: E/AndroidRuntime(5812): Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.excel.extel/com.excel.extel.DialerTab}: android.view.InflateException: Binary XML file line #83: Error inflating class <unknown>
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread.startActivityNow(ActivityThread.java:1499)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:676)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.widget.TabHost.setCurrentTab(TabHost.java:348)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.widget.TabHost.addTab(TabHost.java:238)
08-29 16:53:03.346: E/AndroidRuntime(5812): at com.excel.extel.ExtelMain.onCreate(ExtelMain.java:67)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
08-29 16:53:03.346: E/AndroidRuntime(5812): ... 11 more
08-29 16:53:03.346: E/AndroidRuntime(5812): Caused by: android.view.InflateException: Binary XML file line #83: Error inflating class <unknown>
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
08-29 16:53:03.346: E/AndroidRuntime(5812): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-29 16:53:03.346: E/AndroidRuntime(5812): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.Activity.setContentView(Activity.java:1657)
08-29 16:53:03.346: E/AndroidRuntime(5812): at com.excel.extel.DialerTab.onCreate(DialerTab.java:139)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
08-29 16:53:03.346: E/AndroidRuntime(5812): ... 20 more
08-29 16:53:03.346: E/AndroidRuntime(5812): Caused by: java.lang.reflect.InvocationTargetException
08-29 16:53:03.346: E/AndroidRuntime(5812): at java.lang.reflect.Constructor.constructNative(Native Method)
08-29 16:53:03.346: E/AndroidRuntime(5812): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
08-29 16:53:03.346: E/AndroidRuntime(5812): ... 32 more
08-29 16:53:03.346: E/AndroidRuntime(5812): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:460)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:336)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:715)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.content.res.Resources.loadDrawable(Resources.java:1713)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.view.View.<init>(View.java:1969)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.widget.ImageView.<init>(ImageView.java:116)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.widget.ImageButton.<init>(ImageButton.java:85)
08-29 16:53:03.346: E/AndroidRuntime(5812): at android.widget.ImageBu
有人告訴我什麼問題?是不是我的錯,或者設置的問題?
發佈您的logcat錯誤。 –
你可以在這裏發佈日誌嗎?還有一些代碼,你會得到錯誤.. – Cata
我們不能幫助你,直到你提供給我們完整的堆棧跟蹤。 –