使 2.2 Android 应用程序兼容 1.5+
我使用 Android 2.2 SDK(API 级别 8)编写了一个应用程序。它在模拟器中运行良好,但现在我希望它兼容 Android 1.5+(API 级别 3)或 Android 1.6+(API 级别 4)。
问题是当我尝试在这些版本上运行它时,它在模拟器中崩溃。
使其兼容这些版本的好方法是什么?有没有办法查看哪些类/方法导致这些不兼容问题?
I wrote an application using the Android 2.2 SDK (API level 8). It is running well in the emulator, but now I want it to be compatible to Android 1.5+ (API level 3)or Android 1.6+ (API level 4).
The problem is that it crashes in the emulator when I try to run it on these versions.
What is a good approach to make it compatible to these versions? Is there a way to see which classes/methods cause these incompatibility issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要使用反射来调用 1.5 设备上不可用的功能。有关基本概念,请参阅此博客: http:// android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html
You need to call the features you use not available on a 1.5 device using reflection. See this blog for the basic concept: http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html