在build android 4.4的时候遇到如下错误
Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1065, in <module>
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1061, in main
options.optimize_generation)
File "../../base/android/jni_generator/jni_generator.py", line 996, in GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, namespace)
File "../../base/android/jni_generator/jni_generator.py", line 507, in CreateFromClass
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
不知道有没有人遇到过
------解决方案--------------------
通过查国外网站, 终于找到问题解决方法了。
装jdk的时候,少装了javap工具, 没有遇到问题的同学,比较幸运, 装jdk的时候肯定是全量安装!!!总结一下, 以后对不熟悉的工具还是选择全量安装吧 !
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_45/bin/javap 1
update-alternatives --config javac
update-alternatives --config java
update-alternatives --config javaws
update-alternatives --config jar
update-alternatives --config javap
javap是jdk自带的一个工具,可以反编译,也可以查看java编译器生成的字节码,是分析代码的一个好工具。