Android 2.2的SDK打破了旧手机的兼容性 [英] Android 2.2 SDK breaks compatibility with older phones

查看:139
本文介绍了Android 2.2的SDK打破了旧手机的兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近更新我的应用程序的SDK版本8构建tarket以包括App2SD功能功能为我的用户。

I have recently updated my app to a build tarket of SDK version 8 in order to include the App2SD feature for my users.

不过,我已经对SDK 3(1.5)有问题的设备的报告,启动应用程序,用下面的堆栈跟踪:

However I have had reports of devices on SDK 3 (1.5) having problems starting the application, with the following stack trace:

...
E/AndroidRuntime(10638): Caused by: android.content.res.Resources$NotFoundException: File      res/drawable/title_bar_shadow.9.png from drawable resource ID #0x7f020000
E/AndroidRuntime(10638): at android.content.res.Resources.loadDrawable(Resources.java:1641)
E/AndroidRuntime(10638): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
E/AndroidRuntime(10638): at android.view.View.<init>(View.java:1726)
E/AndroidRuntime(10638): at android.view.View.<init>(View.java:1675)
E/AndroidRuntime(10638): at android.view.ViewGroup.<init>(ViewGroup.java:271)
E/AndroidRuntime(10638): at android.widget.LinearLayout.<init>(LinearLayout.java:92)
E/AndroidRuntime(10638): ... 26 more
E/AndroidRuntime(10638): Caused by: java.io.FileNotFoundException: res/drawable/title_bar_shadow.9.png
E/AndroidRuntime(10638): at android.content.res.AssetManager.openNonAssetNative(Native Method)
E/AndroidRuntime(10638): at android.content.res.AssetManager.openNonAsset(AssetManager.java:392)
E/AndroidRuntime(10638): at android.content.res.Resources.loadDrawable(Resources.java:1634)
E/AndroidRuntime(10638): ... 31 more

如果我改变构建目标回第4版,因为它是previously这个问题消失,另外,如果我从我的XML文件中删除任何图形资源,这个问题就会消失!

If i change the build target back to version 4 as it was previously this issue goes away, also if i remove any graphical resources from my XML files this issue goes away!

任何帮助将是非常美联社preciated因为我现在有一个破碎的应用程序在市场上很多用户。

Any help would be much appreciated as i currently have a broken app on the market for many users.

推荐答案

这可能与不同的图像密度,以及如何SDK 1.5不能处理的开箱即用。看看<一href="http://stackoverflow.com/questions/1922697/not-understanding-how-to-use-different-density-images-for-1-6">here这里

This might be related to different image densities and how SDK 1.5 cant handle that out of the box. Take a look here and here.

这篇关于Android 2.2的SDK打破了旧手机的兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆