简体   繁体   English

Android CyanogenMod源代码编译错误

[英]Android CyanogenMod source compilation error

I've successfully downloaded the CyanogenMod 10 source tree by syncing the latest repo. 通过同步最新的存储库,我已经成功下载了CyanogenMod 10源代码树。 I've also installed the Java JDK properly and already set a ANDROID_JAVA_HOME variable but still getting those errors while executing this command "make -j4 otatools" 我也已经正确安装了Java JDK,并且已经设置了ANDROID_JAVA_HOME变量,但是在执行“ make -j4 otatools”命令时仍然遇到这些错误。

/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: Permission denied
/bin/bash: build/core/find-jdk-tools-jar.sh: Permission denied
build/core/config.mk:348: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com.  Stop.

I used these steps to register the downloaded version of Java as an alternative, and switching it to be used as the default 我使用以下步骤注册了Java的下载版本作为替代,并将其切换为默认版本

update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_60/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_60/bin/javac 1
update-alternatives --set java /opt/jdk1.7.0_60/bin/java
update-alternatives --set javac /opt/jdk1.7.0_60/bin/javac

Output for java -version java -version的输出

java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)

Output for ANDROID_JAVA_HOME ANDROID_JAVA_HOME的输出

echo $ANDROID_JAVA_HOME
/opt/jdk1.7.0_60/bin/

My Machine configuration is Debian Wheezy 64 bit with 4GB RAM 我的机器配置是Debian Wheezy 64位,具有4GB RAM

Errrrrrrrm, correct me if I'm wrong but looking at your update-alternatives, you are actually setting your Java version to JDK 7 Errrrrrrrm,如果我错了,请纠正我,但查看您的更新替代品,您实际上是 Java版本设置为JDK 7

First make sure you have actually Java 6 installed, then try running: 首先确保您已经安装了Java 6,然后尝试运行:

sudo update-alternatives --config java

You should see something like this: 您应该会看到以下内容:

  Selection    Pad                                             Prioriteit Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-6-oracle/jre/bin/java          1         manual mode

Now type in the version you would like to use, for me that is : 1 现在输入您要使用的版本,对我来说是: 1

type enter and then run java -version 输入enter,然后运行java -version

Tell me if it worked! 告诉我是否有效!

EDIT: Whoops didn't even notice that this is a thread from 5 months ago... 编辑:哎呀什至没有注意到这是5个月前的话题...

Sorry for that! 抱歉!

Still Other people who have your problem could find my answer usefull though 还有其他遇到您问题的人可以找到我的答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM