我正在尝试使用GNU gcc 4.7构建android源主分支。
一切顺利,直到我更新到Xcode 4.5。
它似乎与java相关或与权限相关的问题。
我仔细检查了所有目录都是可写的,javac
(1.6.0_37)工作正常。
这是我的配置信息
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=4.1.2.3.4.5.6.7.8.9
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-12.2.0-x86_64-i386-64bit
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
OUT_DIR=out
但我收到此错误
Install: out/host/darwin-x86/bin/acp
host Java: antlr-runtime (out/host/common/obj/JAVA_LIBRARIES/antlr-runtime_intermediates/classes)
target Java: core (out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes)
host Java: dx (out/host/common/obj/JAVA_LIBRARIES/dx_intermediates/classes)
external/jsr305/ri/src/main/java/javax/annotation/CheckForNull.java:14: error while writing javax.annotation.CheckForNull: could not create parent directories
public @interface CheckForNull {
^
1 error
make: *** [out/host/common/obj/JAVA_LIBRARIES/jsr305lib_intermediates/javalib.jar] Error 41
make: *** Waiting for unfinished jobs....
external/antlr/antlr-3.4/runtime/Java/src/main/java/org/antlr/runtime/ANTLRStringStream.java:37: error while writing org.antlr.runtime.ANTLRStringStream: could not create parent directories
public class ANTLRStringStream implements CharStream {
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
make: *** [out/host/common/obj/JAVA_LIBRARIES/antlr-runtime_intermediates/javalib.jar] Error 41
dalvik/dx/src/com/android/dx/Version.java:22: error while writing com.android.dx.Version: could not create parent directories
public class Version {
^
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
make: *** [out/host/common/obj/JAVA_LIBRARIES/dx_intermediates/javalib.jar] Error 41
libcore/luni/src/main/java/java/lang/Object.java:131: error while writing java.lang.Object: could not create parent directories
public class Object {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
make: *** [out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes-full-debug.jar] Error 41
答案 0 :(得分:0)
我遇到了一个非常接近这个问题的问题。
============================================ PLATFORM_VERSION_CODENAME = REL PLATFORM_VERSION = 4.3.2.1.000.000 TARGET_PRODUCT =完整TARGET_BUILD_VARIANT = eng TARGET_BUILD_TYPE =发布 TARGET_BUILD_APPS = TARGET_ARCH = arm TARGET_ARCH_VARIANT = armv7-a TARGET_CPU_VARIANT =通用HOST_ARCH = x86 HOST_OS =达尔文 HOST_OS_EXTRA = Darwin-12.4.0-x86_64-i386-64bit HOST_BUILD_TYPE =发布 BUILD_ID = OPENMASTER OUT_DIR = out ============================================ target Java:telephony-common (输出/目标/普通/ OBJ / JAVA_LIBRARIES /电话-common_intermediates /班) 目标条:libLLVM(out / target / product / generic / obj / lib / libLLVM.so) 目标符号:libGLES_trace (输出/目标/产品/通用/符号/系统/ LIB / libGLES_trace.so) 目标符号:libui (out / target / product / generic / symbols / system / lib / libui.so)目标 符号:libbinder (out / target / product / generic / symbols / system / lib / libbinder.so)目标 Strip:dalvik-vm-unit-tests (输出/目标/产品/通用/ OBJ /可执行/达尔维克-VM-单元tests_intermediates /达尔维克-VM-单元检验) 目标地带:libemoji (out / target / product / generic / obj / lib / libemoji.so)目标条带: libsqlite(out / target / product / generic / obj / lib / libsqlite.so)目标 Strip:libsonivox(out / target / product / generic / obj / lib / libsonivox.so) 目标地带:libharfbuzz_ng (out / target / product / generic / obj / lib / libharfbuzz_ng.so)目标条带: libharfbuzz(out / target / product / generic / obj / lib / libharfbuzz.so) 安装:out / target / product / generic / system / lib / libemoji.so安装: out / target / product / generic / system / lib / libLLVM.so安装: out / target / product / generic / system / lib / libsonivox.so安装: out / target / product / generic / system / lib / libsqlite.so target包: ApplicationsProvider (输出/目标/产品/通用/ OBJ / APPS / ApplicationsProvider_intermediates / package.apk) target Package:BackupRestoreConfirmation (输出/目标/产品/通用/ OBJ / APPS / BackupRestoreConfirmation_intermediates / package.apk) target Package:BasicDreams (输出/目标/产品/通用/ OBJ / APPS / BasicDreams_intermediates / package.apk) 框架的/ opt /电话/ src目录/ JAVA / COM /安卓/内部/电话/ PhoneFactory.java:130: 找不到符号符号:变量PREFERRED_CDMA_SUBSCRIPTION location:类android.provider.Settings.Global Settings.Global.PREFERRED_CDMA_SUBSCRIPTION, ^注意:某些输入文件使用或覆盖已弃用的API。注意:重新编译 -Xlint:弃用细节。注意:某些输入文件使用未经检查或不安全的操作。注意:使用-Xlint重新编译:未选中 细节。 1错误: * [输出/目标/普通/ OBJ / JAVA_LIBRARIES /电话-common_intermediates /类 - 全debug.jar] 错误41 make:* 等待未完成的工作......
问题结果是我最初没有正确地遵循指示。它是在一个区分大小写的文件系统上,根据android安装说明,但我已经从正常的文件系统复制了它。我重新运行repo sync之后就编译了。
如果这听起来像您的问题,请关注http://source.android.com/source/initializing.html:
hdiutil create -type SPARSE -fs'区分大小写的Journaled HFS +' - size 40g~ / android.dmg
hdiutil attach~ / android.dmg.sparseimage -mountpoint / Volumes / android
mv~ / android-source / Volumes / android
cd / Volumes / android / android-source
repo sync
make -j4