ภาพรวมโปรเจ็กต์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
โปรเจ็กต์ใน Android Studio สำหรับแพลตฟอร์มมีทุกอย่างที่กำหนด
พื้นที่ทํางานสําหรับฐานของโค้ด AOSP ตั้งแต่ซอร์สโค้ดและชิ้นงานไปจนถึงโค้ดทดสอบ
และการกําหนดค่าการสร้าง
เมื่อเริ่มโปรเจ็กต์ใหม่ Android Studio สำหรับแพลตฟอร์มจะสร้างโครงสร้างที่จำเป็น
สำหรับไฟล์ทั้งหมดและทำให้ไฟล์เหล่านั้นปรากฏในหน้าต่างโปรเจ็กต์ใน
Android Studio หากต้องการเปิดหน้าต่าง ให้เลือก View > Tool Windows > Project
หน้านี้จะแสดงภาพรวมของคอมโพเนนต์หลักภายในโปรเจ็กต์
การจัดการโปรเจ็กต์ (asfp-config.json
)
asfp-config.json
คือไฟล์ JSON ที่มีตัวเลือกการกำหนดค่าทั้งหมด
สำหรับโปรเจ็กต์ ซึ่งอยู่ในรูทของไดเรกทอรีโปรเจ็กต์
การแก้ไขโมดูลหรือเป้าหมายมื้อกลางวัน
ระบบจะจัดเก็บเส้นทางโมดูลเริ่มต้นจากการสร้างโปรเจ็กต์ไว้ใน
asfp-config.json
เพียงเพิ่ม (หรือนำออก) โมดูลไปยังไฟล์นี้แล้วบันทึก
ซึ่งควรจะมีการแจ้งเตือนแบบบอลลูนปรากฏขึ้นเพื่อแจ้งให้คุณซิงค์
"modulePaths" : [
"frameworks/base",
"packages/apps/Settings",
"add additional module paths here..."
],
การปิดใช้การรองรับในตัว
วิธีปรับแต่งการรองรับเนทีฟสำหรับโปรเจ็กต์
"nativeConfig" : {
"excludePaths" : ["*"],
"excludeGenPaths" : ["*"]
}
excludePaths
: เส้นทางทั้งหมดที่ระบุไว้ที่นี่จะได้รับการยกเว้นจากการรองรับ
เนทีฟโดยสมบูรณ์
excludeGenPaths
: เส้นทางทั้งหมดที่นี่จะไม่มีแหล่งที่มาที่สร้างขึ้นเอง
โปรดทราบว่าคุณสามารถใช้สัญลักษณ์ไวลด์การ์ด (*
) เพื่อระบุเส้นทางทั้งหมด
ในการชำระเงินของที่เก็บได้
พารามิเตอร์การซิงค์
Sync ยอมรับแฟล็กการสร้างที่ผู้ใช้กำหนด (คำสั่ง m
) และตัวแปรสภาพแวดล้อม
คุณกำหนดค่าได้ใน asfp-config.json
โดยทำดังนี้
"syncConfig" : {
"environmentVars" : {
"a": "1",
"b": "2"
},
"buildFlags" : [
"--u=v",
"-x"
]
}
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-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-08-27 UTC"],[],[],null,["# Projects overview\n\nA project in Android Studio for Platform contains everything that defines\nyour workspace for your AOSP codebase, from source code and assets to test\ncode and build configurations.\n\nWhen you start a new project, Android Studio for Platform creates the necessary\nstructure for all your files and makes them visible in the Project window in\nAndroid Studio. To open the window, select View \\\u003e Tool Windows \\\u003e Project.\n\nThis page provides an overview of the key components inside your project.\n\nManaging your project (`asfp-config.json`)\n------------------------------------------\n\n`asfp-config.json` is a JSON file that contains all the configuration options\nfor your project. It is located in the root of your project directory.\n\n### Editing modules or your lunch target\n\nYour initial module paths from project creation are stored in\n`asfp-config.json`. Simply add (or remove) modules to this file and save,\nwhich should pop up a notification balloon prompting you to sync. \n\n \"modulePaths\" : [\n \"frameworks/base\",\n \"packages/apps/Settings\",\n \"add additional module paths here...\"\n ],\n\n### Disabling native support\n\nTo customize native support for your project: \n\n \"nativeConfig\" : {\n \"excludePaths\" : [\"*\"],\n \"excludeGenPaths\" : [\"*\"]\n }\n\n- `excludePaths`: All paths here will be completely excluded from native support.\n- `excludeGenPaths`: All paths here won't have native generated sources.\n\nNote that you can use the wildcard (**`*`**) symbol to indicate all paths\nin the repo checkout.\n\n### Sync parameters\n\nSync accepts user-defined build (`m` command) flags and environment\nvariables. These can be configured in `asfp-config.json` via: \n\n \"syncConfig\" : {\n \"environmentVars\" : {\n \"a\": \"1\",\n \"b\": \"2\"\n },\n \"buildFlags\" : [\n \"--u=v\",\n \"-x\"\n ]\n }"]]