我从源代码构建Android时遇到错误,我没有修改它,它应该真的工作(我很确定我已经安装了所有的库,Java和Python的版本正确)。错误消息如下:
> 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 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [out/target/product/rk3066/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Error 1
make: *** Waiting for unfinished jobs....
我不是真正的专家,所以我提供的信息可能并不完整。在这种情况下 - 让我知道。
答案 0 :(得分:2)
在文件外部的第507行/ chromium_org / base / android / jni_generator / jni_generator.py
p = subprocess.Popen(args=['javap', class_name],
cwd=os.path.dirname(class_file),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
您的PATH似乎没有javap
如果您在usr / lib / jvm中安装了jdk1.6.0_45,那么您可以运行此命令
sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_45/bin/javap 1