ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
ดูและแก้ปัญหาการทดสอบ CTS
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
หน้านี้จะอธิบายวิธีแก้ปัญหาและแก้ไขปัญหาที่เกี่ยวข้องกับการทดสอบ CTS
แก้ไขข้อผิดพลาดหน่วยความจำไม่เพียงพอ
หากพบข้อผิดพลาดเนื่องจากไม่มีหน่วยความจำระหว่างการทดสอบ CTS เช่น java.lang.OutOfMemoryError: Java heap space
ให้เพิ่มหน่วยความจําสูงสุดที่พร้อมใช้งานระหว่างการทดสอบ ดังนี้
แก้ไขสคริปต์ cts-tradefed
ใน WORKING_DIRECTORY/cts/tools/cts-tradefed/etc/
เพิ่มจำนวนเธรดของ Java Virtual Machine (JVM) ด้วยการเพิ่มค่าสำหรับ Flag -Xmx
ตัวอย่างต่อไปนี้จะเพิ่มค่าเป็น 16 GB
${JAVA_BINARY} $RDBG_FLAG -Xmx16g -XX:+HeapDumpOnOutOfMemoryError -cp ${JAR_PATH} -DCTS_ROOT=${CTS_ROOT} com.android.compatibility.common.tradefed.command.CompatibilityConsole "$@"
แก้ไขปัญหาเกี่ยวกับการทดสอบสตรีมมิง
หากสตรีมไฟล์จากเซิร์ฟเวอร์ระยะไกลไม่ได้เนื่องจากข้อจำกัดของไฟร์วอลล์ คุณต้องติดตั้งไฟล์วิดีโอในเซิร์ฟเวอร์ไฟล์ในเครื่องและทำการทดสอบสื่อในเครื่อง ดูข้อมูลเพิ่มเติมได้ที่เรียกใช้การทดสอบสื่อในเครื่อง
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# View and troubleshoot CTS tests\n\nThis page explains how to troubleshoot and fix issues related to CTS testing.\n\nFix out of memory error\n-----------------------\n\nIf you encounter an out of memory error during CTS testing, such as\n`java.lang.OutOfMemoryError: Java heap space`, increase the maximum memory\navailable during test run:\n\n1. Edit the `cts-tradefed` script in \u003cvar translate=\"no\"\u003eWORKING_DIRECTORY\u003c/var\u003e`/cts/tools/cts-tradefed/etc/`.\n\n2. Increase the number of Java virtual machine (JVM) threads by increasing the value for the `-Xmx` flag. The following example increases the value to 16 GB:\n\n ${JAVA_BINARY} $RDBG_FLAG -Xmx16g -XX:+HeapDumpOnOutOfMemoryError -cp ${JAR_PATH} -DCTS_ROOT=${CTS_ROOT} com.android.compatibility.common.tradefed.command.CompatibilityConsole \"$@\"\n\nFix issues with streaming tests\n-------------------------------\n\nIf you can't stream files from a remote server due to firewall restrictions,\nyou must install video files on a local file server and run media tests locally. For more information, refer to [Run media tests locally](/docs/compatibility/cts/run-locally)."]]