当前位置: 技术问答>linux和unix
linux 编译Android SDK老是报着个错
来源: 互联网 发布时间:2017-03-10
本文导语: 最近在编译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但还是没用。
———————————————————————————————————————————————————————
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但还是没用。
|
/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.
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.
|
请使用 ubuntu 的 apt-get 安装 android 开发工具包
或者红帽的 yum 安装
或者红帽的 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
#
#
# 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
#
|
这个最好是根据官方的说明来搞, javac有两种一种是sun的,一种是openjava ,最好是安装sun的,
另外版本1.5 还是1.6也最好按官方说明来选择,否则都有可能出问题。
我交叉编译过android,对此深有体会。
另外版本1.5 还是1.6也最好按官方说明来选择,否则都有可能出问题。
我交叉编译过android,对此深有体会。
|
这个就要你单步运行还有调试了