支持 1.5 目标的屏幕,无法使应用程序不可缩放

发布于 2024-08-17 23:18:35 字数 208 浏览 5 评论 0原文

我现在有点迷失,我正在尝试做的事情:构建一个 1.5 兼容的应用程序,该应用程序也应该在 Nexus 等 2.0/2.1 设备上运行。问题是在 Eclipse 中设置的 1.5 目标中,supports-screen 无法按照预期的方式工作。

我错过了什么吗?基本上,我只是希望我的应用程序不要缩放任何东西,我会处理这个问题(anyScale = true)

提前致谢!

I'm a bit lost right now, what I'm trying to do: build a 1.5 compatible app that should also run on 2.0/2.1 devices like the Nexus. The problem is that supports-screen doesn't work the way it's supposed to with 1.5 target set in eclipse.

Did I miss something? Basically, I just want my app not to scale anything, I'll handle that ( anyScale = true )

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

不寐倦长更 2024-08-24 23:18:35

正如您所注意到的 < 的;support-screens> 元素是在 API 级别 4(即 Android 1.6)中引入的,这意味着它不适用于 Android 1.5应用。

但是,您可以让它适用于在 1.5 上运行的应用程序。

如果您指定 targetSdkVersion 以及 minSdkVersion,您的应用程序将开始在所有平台上正常工作。

因此,您的清单中应有一个如下所示的条目:

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>

Android 开发者文档中的Android API 级别页面

As you've noted the <support-screens> element of <manifest> was indroduced at API Level 4, which is Android 1.6, and this means it doesn't work for an Android 1.5 application.

However, you can get this to work for an application that does run on 1.5.

If you specify targetSdkVersion as well as minSdkVersion your application will start to work correctly on all platforms.

So have an entry in your manifest like this:

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>

This is covered in the Android API Levels page in the Android Developer documentation.

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