使 2.2 Android 应用程序兼容 1.5+

发布于 2024-09-24 07:16:38 字数 198 浏览 0 评论 0原文

我使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甩你一脸翔 2024-10-01 07:16:39

您需要使用反射来调用 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文