Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Môi trường phát triển TF
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trade Federation được phân phối cùng với AOSP và sử dụng hệ thống xây dựng Android để tạo tệp nhị phân. Hãy đảm bảo bạn đã thiết lập môi trường xây dựng để biên dịch và chạy các gói từ cây nguồn Android.
Xây dựng Tradefed
Từ thư mục gốc của cây nguồn Android:
source ./build/make/envsetup.sh
lunch <device-target>
make tradefed-all -j8
Hãy xem phần Phát triển Tradefed để biết thêm thông tin chi tiết về cách thiết lập môi trường lập trình trong Tradefed.
Chạy từ dòng lệnh
Tradefed yêu cầu tiện ích adb
trong $PATH
:
export PATH=$PATH:<path/to/adb>
Nếu Tradefed đã được tạo, bạn có thể truy cập tập lệnh trình chạy tradefed.sh
từ đường dẫn của mình. Cách chạy Trade Federation Console:
tradefed.sh
Giờ đây, bạn đã thiết lập xong môi trường cho Trade Federation.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-07-27 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-27 UTC."],[],[],null,["# TF development environment\n\nTrade Federation is distributed with the AOSP and uses the Android build system\nto create its binary. Make sure you've [established\na build environment](/docs/setup/initializing) to compile and run packages from the\nAndroid source tree.\n\nBuild Tradefed\n--------------\n\n\nFrom the root directory of the Android source tree: \n\n source ./build/make/envsetup.sh\n lunch \u003cdevice-target\u003e\n make tradefed-all -j8\n\n\nSee [Developing Tradefed](/docs/core/tests/tradefed/development)\nfor more details about how to set up your environment for coding in Tradefed.\n\nRun from command line\n---------------------\n\n\nTradefed requires the `adb` utility in your `$PATH`: \n\n```\nexport PATH=$PATH:\u003cpath/to/adb\u003e\n```\n\n\nIf Tradefed was built, the `tradefed.sh` launcher script is\naccessible from your path. To launch the\n[Trade Federation Console](/docs/core/tests/tradefed/fundamentals/console): \n\n```\ntradefed.sh\n```\n\n\nNow your environment is set up for Trade Federation."]]