ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
ภาพรวมการสร้าง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
AOSP ใช้ระบบการสร้าง Soong เพื่อสร้าง Android Soong ใช้ประโยชน์จากคอมโพเนนต์ kati GNU ของเครื่องมือโคลน Make และระบบการสร้าง Ninja เพื่อเร่งความเร็วการสร้าง Android
ไฟล์บิลด์ Soong เรียกว่าไฟล์พิมพ์เขียวและมีชื่อว่า Android.bp
ไฟล์เหล่านี้มีไวยากรณ์และความหมายคล้ายกับไฟล์ BUILD ของ Bazel
ดูคำอธิบายโดยละเอียดของรูปแบบไฟล์ Android.bp
ได้ที่รูปแบบไฟล์ Android.bp
ดูข้อมูลเกี่ยวกับการแปลงไฟล์ Make เป็นไฟล์ Android.bp
ได้ที่การเปรียบเทียบ Make กับ Soong
แฟล็กการเปิดตัวฟีเจอร์และแฟล็กการสร้าง
Flag การเปิดตัวฟีเจอร์คือ Flag แบบไบนารีที่ใช้แยกโค้ดที่ยังไม่ได้ทดสอบออกจากโค้ดที่ทดสอบแล้ว หากมีมิเรอร์ของสาขาการพัฒนาภายนอก AOSP ของคุณเอง คุณสามารถใช้ Flag เหล่านี้เพื่อให้โค้ดที่มิเรอร์มีเสถียร นอกจากนี้ หากต้องการมีส่วนร่วมในโค้ดของสาขาการพัฒนาภายนอกแบบสาธารณะ เจ้าหน้าที่ตรวจสอบการเปลี่ยนแปลงอาจขอให้คุณใช้ Flag สำหรับโค้ด
Flag การสร้างคือค่าคงที่ (สตริง) ของเวลาสร้างที่ใช้แก้ไขการสร้าง เช่น ตัวเลือกในการรวมไลบรารีโค้ด
ดูคำอธิบายเกี่ยวกับสาขาโค้ดต่างๆ ได้ที่วงจรการเผยแพร่
FLAG การเปิดตัวฟีเจอร์และ Flag การสร้างต้องมีการแก้ไขไฟล์การสร้าง ดูข้อมูลเพิ่มเติมเกี่ยวกับ Flag เหล่านี้ รวมถึงการใช้งานในบิลด์ได้ที่ภาพรวม Flag การเปิดตัวฟีเจอร์และหน้าที่เกี่ยวข้อง
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# Build overview\n\nAOSP uses the *Soong* build system to build Android. Soong leverages the\n[kati](https://github.com/google/kati/blob/master/README.md) GNU\nMake clone tool and [Ninja](https://ninja-build.org/) build system\ncomponent to speed up builds of Android.\n\nSoong build files are called *blueprint files* and are named `Android.bp`. These\nfiles are similar in syntax and\nsematics to [Bazel BUILD files](https://bazel.build/reference/be/overview).\n\nFor a detailed description of the `Android.bp` file format, see\n[Android.bp file format](/docs/setup/reference/androidbp).\n\nFor information on converting your Make files to `Android.bp` files, see\n[Make and Soong comparison](/docs/setup/build/make-to-soong).\n\nFeature launch flags and build flags\n------------------------------------\n\n*Feature launch flags* are binary flags used to isolate untested code from\ntested code. If you have your own mirror of the AOSP external development\nbranch, you can use these flags to keep your mirrored code stable. Additionally,\nif you intend on contributing code to the public external development branch,\nyou might be asked by your change's reviewer to implement a flag for your code.\n\n*Build flags* are build-time constants (strings) used to modify your build, such\nas optionally including a code library.\n\nFor an explanation of the different code branches, see\n[Release lifecycle](/docs/setup/contribute/release-lifecycle).\n\nFeature launch flags and build flags require changes to build files. For\nadditional information on these flags, including their use in a build, see\nthe [Feature launch flags overview](/docs/setup/build/feature-flagging) and\nadjacent pages."]]