การรองรับอุปกรณ์ ChromeOS สำหรับแอป
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คุณสามารถใช้ Google Play Store เพื่อติดตั้งแอป Android ใน
Chromebook เอกสารนี้อธิบายเกี่ยวกับ Chromebook, Chromebox และ
Chromebase ที่คุณสามารถติดตั้งแอป Android
ภาพรวม
โทรศัพท์ Android ส่วนใหญ่มีชิปเซ็ต ARM อย่างไรก็ตาม อุปกรณ์ ChromeOS จำนวนมากใช้ชิป x86
ความแตกต่างนั้นไม่สำคัญสำหรับแอปพื้นฐานที่เขียนด้วย Kotlin หรือ Java
อย่างไรก็ตาม สำหรับแอปที่เขียนด้วยโค้ดแบบเนทีฟ ซึ่งรวมถึงแอปที่สร้างด้วยเกม
เครื่องยนต์ ชิปเซ็ตในอุปกรณ์
อาจเป็นข้อกังวลที่สำคัญ
ตามหลักการแล้ว แอปและเกมทั้งหมดที่ใช้โค้ดแบบเนทีฟมาพร้อมกับ Android รายใหญ่ทั้ง 4 รายการ
ABI (อินเทอร์เฟซแบบไบนารีของแอปพลิเคชัน):
armeabi-v7a (arm32), arm64-v8a (arm64), x86 (x86_32) และ x86_64 ซึ่งจะให้ประสิทธิภาพที่ดีที่สุด
และแบตเตอรี่ที่ต่ำที่สุดสำหรับแต่ละอุปกรณ์ เช่น build.gradle
ที่อิงตาม cmake
อาจมีข้อมูลต่อไปนี้
ดึงดูด
externalNativeBuild {
cmake {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
Kotlin
externalNativeBuild {
cmake {
abiFilters("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
}
}
ขนาด Android Package Kit (APK)
ABI แต่ละรายการใน APK โมโนลิธจะมีขนาดเพิ่มขึ้น ซึ่งอาจส่งผลต่อ
การใช้งานดิสก์ของผู้ใช้ ขนาดการดาวน์โหลดแอป และผลกระทบที่มีต่อแอป
ตามขีดจำกัดขนาดใน Play Store วิธีที่ดีที่สุดในการหลีกเลี่ยงปัญหานี้คือการใช้
Android App Bundle
App Bundle
ช่วยให้คุณรวม ABI ทั้ง 4 รายการจากภายใน Android Studio ได้อย่างง่ายดายโดยไม่ต้องเพิ่ม
ขนาดการดาวน์โหลดสำหรับผู้ใช้ของคุณ และยังทำให้การใช้ประโยชน์จาก Dynamic Delivery เป็นเรื่องง่าย
อนุญาตให้ผู้ใช้ดาวน์โหลดเนื้อหาเกมขนาดใหญ่เมื่อได้รับคำขอเท่านั้น หากใช้งาน App Bundle ไม่ได้
คุณสามารถใช้ APK หลายรายการเวอร์ชันเก่าสำหรับ
ที่มีพฤติกรรมคล้ายกัน
บิลด์ 32 บิตและ 64 บิต
แอป Android ทั้งหมดต้องมีเวอร์ชันบิลด์ 64 บิต บิลด์ 32 บิตนั้นไม่บังคับสำหรับทั้ง ARM และ
x86 โปรดดู Android 64 บิต
เอกสารประกอบ เพื่อดูข้อมูลเพิ่มเติม
แม้ว่าจะมีเฉพาะบิลด์ 64 บิต ก็จะลดจำนวนเป้าหมายของบิลด์ที่จำเป็นและ
ของแพลตฟอร์มการทดสอบของ Google ก็ยังจำกัดประเภทอุปกรณ์ที่เล่นเกมของคุณได้
สำหรับ
เช่น เนื่องจากข้อจำกัดด้านฮาร์ดแวร์อื่นๆ Chromebook รุ่นเก่าๆ ก็ใช้ Android แบบ 32 บิตได้เท่านั้น
แม้ว่าจะมี CPU แบบ 64 บิตก็ตาม ในการทำให้แอปทำงานได้ในอุปกรณ์เหล่านี้ ให้รวม
ทั้งการสนับสนุน 32 บิต และ 64 บิต
การแปลด้วย ARM
Chromebook x86 จะพยายามแปลโค้ด ARM ทุกครั้งที่เป็นไปได้ แต่
จะทำให้การทำงานช้าลงและใช้พลังงานแบตเตอรี่เพิ่มขึ้น สำหรับผู้ใช้ที่ดีที่สุด
ให้สร้างบิลด์ x86 หากทำไม่ได้ ให้ระบุ ABI ทั้ง arm32 และ arm64 ด้วย
ของคุณ เพราะ Chromebook รุ่น x86 บางรุ่นอาจไม่แปลรหัส arm64
แม้ว่าการแปลด้วย arm32 จะมีให้บริการบน Chromebook ที่ใช้ Android ได้ทุกเครื่อง ไม่ใช่ Chromebook ทุกเครื่อง
แปลรหัส arm64 ได้ หมายความว่าหากเกมของคุณมีเป้าหมายบิลด์เป็น ARM64
ไม่พร้อมใช้งานในอุปกรณ์ ChromeOS จำนวนมาก หากจัดส่งไม่ได้
ไบนารี x86 ซึ่งรวมทั้ง ABI ของ arm32 และ arm64 ในบิลด์ของคุณ
ABI ที่รวม |
การรองรับ ChromeOS |
ARM64 |
แย่ |
arm32 และ arm64 |
พอใช้ (พร้อมคำแปล) |
arm32, arm64, x86_32 และ x86_64 |
ดีที่สุด |
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],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 |"]]