2

我正在尝试使用 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
4

1 回答 1

0

我遇到了一个非常接近这个问题的问题。

所以目标包:ApplicationsProvider(out/target/product/generic/obj/APPS/ApplicationsProvider_intermediates/package.apk)目标包:BackupRestoreConfirmation(out/target/product/generic/obj/APPS/BackupRestoreConfirmation_intermediates/package.apk)目标包: BasicDreams(out/target/product/generic/obj/APPS/BasicDreams_intermediates/package.apk)框架/opt/telephony/src/java/com/android/internal/telephony/PhoneFactory.java:130:找不到符号符号:变量PREFERRED_CDMA_SUBSCRIPTION 位置:类 android.provider.Settings.Global Settings.Global.PREFERRED_CDMA_SUBSCRIPTION, ^ 注意:某些输入文件使用或覆盖已弃用的 API。注意:使用 -Xlint:deprecation 重新编译以获取详细信息。笔记:一些输入文件使用未经检查或不安全的操作。注意:使用 -Xlint:unchecked 重新编译以获取详细信息。1个错误:* [out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/classes-full-debug.jar] 错误 41 make: *等待未完成的工作......

问题原来是我一开始没有正确遵循指示。根据 android 设置说明,它位于区分大小写的文件系统上,但我已将其从普通文件系统复制过来。在我重新运行 repo sync 后,它已编译。

如果这听起来像您的问题,请遵循http://source.android.com/source/initializing.html

hdiutil create -t​​ype SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android.dmg

hdiutil attach ~/android.dmg.sparseimage -mountpoint /Volumes/android

mv ~/android-source /Volumes/android

cd /Volumes/android/android-source

回购同步

使-j4

于 2013-08-06T16:20:25.580 回答