ChromeOS 设备对应用的支持
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以使用 Google Play 商店在多款 Google Chromebook 上安装 Android 应用。本文档介绍了您可以安装 Android 应用的 Chromebook、Chromebox 和 Chromebase。
概览
大多数 Android 手机都有 ARM 芯片组。不过,许多 ChromeOS 设备使用 x86 芯片。
对于用 Kotlin 或 Java 编写的基本应用来说,这种差异并不重要。不过,对于用原生代码编写的应用(包括使用游戏引擎创建的应用)来说,设备中的芯片组可能是一个值得关注的重要问题。
理想情况下,所有使用原生代码的应用和游戏都搭载了
ABI(应用二进制接口):
armeabi-v7a (arm32)、arm64-v8a (arm64)、x86 (x86_32) 和 x86_64。这样可让每台设备实现最高的性能和最低的电池消耗。例如,基于 cmake 的 build.gradle
文件可能包含:
Groovy
externalNativeBuild {
cmake {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
Kotlin
externalNativeBuild {
cmake {
abiFilters("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
}
}
Android 软件包套件 (APK) 大小
单体式 APK 中的每个 ABI 都会使其增大。这会影响
用户的磁盘使用情况、应用的下载大小,以及应用是否会受到影响
具体取决于 Play 商店的大小上限避免这种情况的最佳方法是使用
Android App Bundle。
app bundle
让您可以在 Android Studio 中轻松捆绑所有四种 ABI,而无需增加
下载大小。它们还可让您轻松利用 Dynamic Delivery,
让用户可以仅在收到请求时下载大型游戏内容。如果无法使用 App Bundle
则可以使用旧版多 APK 来
行为相似
32 位和 64 位 build
所有 Android 应用都必须提供 64 位 build 版本。32 位 build 对于 ARM 和 x86 设备都是可选的。有关详情,请参阅 Android 64 位
文档了解详情。
虽然仅提供 64 位 build 会减少所需的 build 目标数量,
测试平台,也会限制可运行游戏的设备类型。
对于
例如,由于其他硬件限制,许多旧版 Chromebook 只能运行
尽管您的应用具有 64 位 CPU,为了确保您的应用可以在这些设备上运行,应同时支持 32 位和 64 位。
ARM 转换
x86 Chromebook 会尽可能尝试转换 ARM 代码,但转换操作会降低性能并增加电池用量。面向最佳用户
体验,提供 x86 build。如果无法做到这一点,则应将 arm32 和 arm64 ABI
因为某些 x86 Chromebook 可能无法转换 arm64 代码。
虽然 arm32 翻译适用于所有支持 Android 的 Chromebook,但并非所有 Chromebook
可以转换 arm64 代码。这意味着,如果游戏只有 arm64 build 目标
但不适用于大多数 ChromeOS 设备。如果您无法提供 x86 二进制文件,则应在 build 中同时包含 arm32 和 arm64 ABI。
包含的 ABI |
支持 ChromeOS |
arm64 |
较差 |
arm32 和 arm64 |
好(通过转换) |
arm32、arm64、x86_32 和 x86_64 |
最佳 |
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# ChromeOS device support for apps\n\nYou can use the Google Play Store to install Android apps on several Google\nChromebooks. This document describes the Chromebooks, Chromeboxes, and\nChromebases on which you can install Android apps.\n\nOverview\n--------\n\n\nMost Android phones have ARM chipsets. However, many ChromeOS devices use x86 chips.\nThe difference is not important for basic apps written in Kotlin or Java.\nHowever, for apps written in native code, including those created with game\nengines, the chipset in the device can be an important concern.\n\n\nIdeally, all apps and games with native code ship with all four major Android\n[ABIs (Application Binary Interfaces)](https://developer.android.com/ndk/guides/abis):\narmeabi-v7a (arm32), arm64-v8a (arm64), x86 (x86_32), and x86_64. This provides the best performance\nand lowest battery consumption for each device. For example, a cmake-based `build.gradle`\nfile might contain: \n\n### Groovy\n\n```groovy\nexternalNativeBuild {\n cmake {\n abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'\n }\n}\n```\n\n### Kotlin\n\n```kotlin\nexternalNativeBuild {\n cmake {\n abiFilters(\"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\")\n }\n}\n```\n\nAndroid Package Kit (APK) size\n------------------------------\n\n\nEach ABI in a monolithic APK increases its size. This can affect\nyour users' disk usage, the app download size, and whether the app is affected\nby the Play Store size limits. The best way to avoid this is to use\n[Android App Bundles](https://developer.android.com/guide/app-bundle).\n\n\nApp Bundles\nlet you easily bundle all four ABIs from within Android Studio without increasing the\ndownload size for your users. They also make it easy to take advantage of [Dynamic Delivery](https://developer.android.com/guide/app-bundle/dynamic-delivery),\nletting users download large game content only when requested. If App Bundles are not a possibility\nfor you, you can use the older [multi-APK](https://developer.android.com/google/play/publishing/multiple-apks) for\nsimilar behaviour.\n\n32-bit and 64-bit builds\n------------------------\n\n\nAll Android apps must provide a 64-bit build version. A 32-bit build is optional for both ARM and\nx86 devices. See the [Android 64-bit\ndocumentation](https://developer.android.com/distribute/best-practices/develop/64-bit) for more information.\n\n\nWhile only providing 64-bit builds reduces the number of build targets needed and your\ntesting surface, it also limits the kinds of devices that can run your game.\nFor\nexample, due to other hardware limitations, many older Chromebooks can only run 32-bit Android\napps, despite having 64-bit CPUs. To ensure your app can run on these devices, include\nboth 32 and 64-bit support.\n\nARM translation\n---------------\n\n\nx86 Chromebooks try to translate ARM code whenever possible, but\ntranslation slows performance and increases battery usage. For the best user\nexperience, provide x86 builds. If you can't, then include both arm32 and arm64 ABIs in\nyour builds, because some x86 Chromebooks might not translate arm64 code.\n\n\nAlthough arm32 translation is available on all Android-capable Chromebooks, not all Chromebooks\ncan translate arm64 code. This means that if your game only has arm64 build targets,\nit isn't available for a large number of ChromeOS devices. If you are unable to ship\nx86 binaries, include both arm32 and arm64 ABIs in your builds.\n\n| Included ABIs | Support for ChromeOS |\n|----------------------------------|-----------------------|\n| arm64 | Poor |\n| arm32 and arm64 | OK (with translation) |\n| arm32, arm64, x86_32, and x86_64 | Best |"]]