问题描述
我能够将android-5.0.1_r1的源代码获取到我的工作目录中.但是,由于午餐命令给我带来了麻烦,因此我无法在仿真器上构建和运行代码.
I was able to get the source code for android-5.0.1_r1 into my working directory. However, I have trouble building and running the code on an emulator because the lunch command is giving me trouble.
repo has been initialized in /Volumes/AOSPDiskImage/AOSP
Nikhils-MBP:AOSP Nikhil$ . build/envsetup.sh
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/fugu/vendorsetup.sh
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-mips/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/lge/hammerhead/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/moto/shamu/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including sdk/bash_completion/adb.bash
Nikhils-MBP:AOSP Nikhil$ lunch
You're building on Darwin
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. aosp_deb-userdebug
8. aosp_flo-userdebug
9. full_fugu-userdebug
10. aosp_fugu-userdebug
11. aosp_grouper-userdebug
12. aosp_tilapia-userdebug
13. mini_emulator_arm64-userdebug
14. mini_emulator_arm-userdebug
15. mini_emulator_mips-userdebug
16. mini_emulator_x86-userdebug
您想要哪个? [aosp_arm-eng]
Which would you like? [aosp_arm-eng]
我每次都选择一个选项,不断收到如下消息:
Everytime, I picked one of the options I kept getting a message that looks like:
Which would you like? [aosp_arm-eng] 6
build/core/combo/mac_version.mk:38:
*****************************************************
build/core/combo/mac_version.mk:39: * Can not find SDK 10.6 at
/Developer/SDKs/MacOSX10.6.sdk
build/core/combo/mac_version.mk:40:
*****************************************************
build/core/combo/mac_version.mk:41: *** Stop.. Stop.
** Don't have a product spec for: 'aosp_x86_64'
** Do you have the right repo manifest?
我想念什么?我该怎么办?
What am I missing? What should I do?
推荐答案
假定您在优胜美地遇到此问题,这是一个已知问题.
Assuming you're encountering this issue on Yosemite, it's a known issue.
虽然目前尚无正式的解决方法,但假设您已安装XCode,则应该可以通过符号链接当前的SDK来修复它:
While there's no official workaround at the moment, assuming you have XCode installed, you should be able to fix it by symlinking your current SDK:
sudo ln -s /Developer/SDKs/MacOSX10.10.sdk /Developer/SDKs/MacOSX10.6.sdk
然后修改build/core/combo/mac_version.mk
,然后更改:
mac_sdk_versions_supported := 10.6 10.7 10.8
到
mac_sdk_versions_supported := 10.9 10.10
这仅仅是Xcode版本控制及其以前在构建过程中被硬编码的方式的问题.
It's simply an issue with Xcode versioning and the way it was previously hardcoded into the build process.
这篇关于在Mac上运行AOSP构建(Yosemite及更高版本)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!