Android Eclipse应用程序,兼容错误

时间:2015-03-19 23:59:48

标签: android eclipse

我正在开发Android应用程序只是为了爱好,我制作了一个应用程序,当我在手机上测试效果很好时,我测试了:

  • 阿尔卡特偶像OneTouch 2S(6050y)
  • Sony Xperia Tipo(st21i)
  • 三星Galaxy Ace
  • 华硕Memo Pad HD7(平板电脑)

效果很好,完全没有错误...... 但是当我在三星Galaxy S4和三星Galaxy S3上测试时 没有背景音乐(在Galaxy S4上没有显示背景图片),我点击后看到报告错误信息,所以应用程序粉碎..

错误日志:

03-20 16:55:07.366: D/skia(29417): --- allocation failed for scaled bitmap
03-20 16:55:07.376: D/AndroidRuntime(29417): Shutting down VM
03-20 16:55:07.376: W/dalvikvm(29417): threadid=1: thread exiting with uncaught exception (group=0x4206c700)
03-20 16:55:07.391: E/AndroidRuntime(29417): FATAL EXCEPTION: main
03-20 16:55:07.391: E/AndroidRuntime(29417): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.**********a/com.***********a.Info}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.ActivityThread.access$700(ActivityThread.java:159)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.os.Handler.dispatchMessage(Handler.java:99)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.os.Looper.loop(Looper.java:176)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.ActivityThread.main(ActivityThread.java:5419)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at java.lang.reflect.Method.invokeNative(Native Method)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at java.lang.reflect.Method.invoke(Method.java:525)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at dalvik.system.NativeStart.main(Native Method)
03-20 16:55:07.391: E/AndroidRuntime(29417): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.LayoutInflater.createView(LayoutInflater.java:626)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:675)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:700)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.LayoutInflater.inflate(LayoutInflater.java:470)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:361)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.Activity.setContentView(Activity.java:1956)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at *********.Info.onCreate(Info.java:16)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.Activity.performCreate(Activity.java:5372)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257)
03-20 16:55:07.391: E/AndroidRuntime(29417):    ... 11 more
03-20 16:55:07.391: E/AndroidRuntime(29417): Caused by: java.lang.reflect.InvocationTargetException
03-20 16:55:07.391: E/AndroidRuntime(29417):    at java.lang.reflect.Constructor.constructNative(Native Method)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.LayoutInflater.createView(LayoutInflater.java:600)
03-20 16:55:07.391: E/AndroidRuntime(29417):    ... 23 more
03-20 16:55:07.391: E/AndroidRuntime(29417): Caused by: java.lang.OutOfMemoryError
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:832)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.content.res.Resources.loadDrawable(Resources.java:2988)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.View.<init>(View.java:3563)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.view.ViewGroup.<init>(ViewGroup.java:475)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.widget.LinearLayout.<init>(LinearLayout.java:176)
03-20 16:55:07.391: E/AndroidRuntime(29417):    at android.widget.LinearLayout.<init>(LinearLayout.java:172)
03-20 16:55:07.391: E/AndroidRuntime(29417):    ... 26 more

请帮忙吗?

0 个答案:

没有答案