2 l o s l_o_s 于 2014.04.06 18:23 提问

安卓系统源代码编译报错,信息如下。

....
including ./system/extras/Android.mk ...
including ./system/media/audio_route/Android.mk ...
including ./system/media/audio_utils/Android.mk ...
including ./system/media/camera/src/Android.mk ...
including ./system/media/camera/tests/Android.mk ...
including ./system/netd/Android.mk ...
including ./system/security/keystore-engine/Android.mk ...
including ./system/security/keystore/Android.mk ...
including ./system/security/softkeymaster/Android.mk ...
including ./system/vold/Android.mk ...
including ./tools/adt/idea/android/ultimate/get_modification_time/jni/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
Gyp action: Generating JNI bindings from /media/li/ubuntus/sourceOfAndroid/prebuilts/sdk/17/android.jar/android/view/Surface.class (out/target/product/generic/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h)
Traceback (most recent call last):
File "../../base/android/jni_generator/jni_generator.py", line 1103, in
sys.exit(main(sys.argv))
File "../../base/android/jni_generator/jni_generator.py", line 1099, in main
GenerateJNIHeader(input_file, output_file, options)
File "../../base/android/jni_generator/jni_generator.py", line 1012, in GenerateJNIHeader
jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, options)
File "../../base/android/jni_generator/jni_generator.py", line 522, in CreateFromClass
jni_from_javap = JNIFromJavaP(stdout.split('\n'), options)
File "../../base/android/jni_generator/jni_generator.py", line 464, in init
contents[1]).group('class_name')
IndexError: list index out of range
make: *** [out/target/product/generic/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Error 1


以上是报错信息,求编译过安卓系统源代码的大神支招!小弟想搞安卓移植,需要编译好的系统源码。

3个回答

kernel_m
kernel_m   2014.07.14 11:23

我也出现了这种错误,请问楼主解决了这个问题了吗

baidu_35904821
baidu_35904821 回复谁为为之_孰令听之: 这个是怎么解决的啊 我把环境变量添加在脚本里面了但是还是会出错
大约一年之前 回复
l_o_s
l_o_s 解决了。
3 年多之前 回复
wxh041
wxh041   2014.09.30 10:07

楼主怎么解决这个问题的,求共享。~~

budapeng2000
budapeng2000   2015.08.08 13:45

把javap所在路径添加到PATH中

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!