日期:2014-05-16  浏览次数:20870 次

linux 编译Android SDK老是报着个错
最近在编译android SDK,但是莫名其妙的会报下面的错误,一直找不到解决办法,最后我只好重新搭了一个虚拟机,在第一次编译的时候没有问题,第一次因为我的机子蓝屏没有编译成功,在进行第二次编译的时候又报下面的错,有没有哪位大虾能解释一下,我看到网上这个问题很多人都有,都没有找到解决办法,请哪位高人指点?
———————————————————————————————————————————————————————
ld/tools/merge-event-log-tags.py:29: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
host Java: javassist (out/host/common/obj/JAVA_LIBRARIES/javassist_intermediates/classes)
host Java: mockwebserver-hostdex (out/host/common/obj/JAVA_LIBRARIES/mockwebserver-hostdex_intermediates/classes)
host Java: cts-api-coverage (out/host/common/obj/JAVA_LIBRARIES/cts-api-coverage_intermediates/classes)
Note: external/eyes-free/AccessCheck/src/com/android/accessibility/AccessibilityValidationContentHandler.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
host Java: cts-native-xml-generator (out/host/common/obj/JAVA_LIBRARIES/cts-native-xml-generator_intermediates/classes)
host Java: host-libprotobuf-java-2.3.0-lite (out/host/common/obj/JAVA_LIBRARIES/host-libprotobuf-java-2.3.0-lite_intermediates/classes)
host Java: host-libprotobuf-java-2.3.0-micro (out/host/common/obj/JAVA_LIBRARIES/host-libprotobuf-java-2.3.0-micro_intermediates/classes)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002b5f661ab32f, pid=14066, tid=47688818235136
#
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x6d332f]
#
# An error report file with more information is saved as:
# /home/mercedes/Workspace/tvd/android4.0/hs_err_pid14066.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
/bin/bash: line 1: 14066 Aborted javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999 -encoding UTF-8 -extdirs "" -d out/host/common/obj/JAVA_LIBRARIES/host-libprotobuf-java-2.3.0-micro_intermediates/classes \@out/host/common/obj/JAVA_LIBRARIES/host-libprotobuf-java-2.3.0-micro_intermediates/classes/java-source-list-uniq
make: *** [out/host/common/obj/JAVA_LIBRARIES/host-libprotobuf-java-2.3.0-micro_intermediates/javalib.jar] Error 41
make: *** Waiting for unfinished jobs....
Note: external/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
mercedes@mercedes-pc:~/Workspace/tvd/android4.0$ 

备注:sdk包没有问题,我重点怀疑是jdk的问题,我重新装了sdk但还是没用。


------解决方案--------------------
请使用 ubuntu 的 apt-get 安装 android 开发工具包
或者红帽的 yum 安装
------解决方案--------------------
看看错误信息是什么? hs_err_pid14066.log

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002b5f661ab32f, pid=14066, tid=47688818235136
#
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x6d332f]
#
# An error report file with more information is saved as:
# /home/mercedes/Workspace/tvd/android4.0/hs_err_pid14066.log
#


------解决方案--------------------
/bin/bash: line 1: 14066 Aborted javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999 -encoding UTF-8 -extdirs "" -d out/host/common/obj/JAVA_LIBRARIES/host-libprotobuf-java-2.3.0-micro_intermediates/classes \@out/host/common/obj/JAVA_LIBRARIES/host-libprotobuf-java-2.3.0-mic