s5p4418-android5.1.1编译出错问题1

环境:ubuntu15.1wily

OPENJDK-7

android5.1.1

出错信息:

Traceback (most recent call last):

  File "../../base/android/jni_generator/jni_generator.py", line 1527, in 
    sys.exit(main(sys.argv))
  File "../../base/android/jni_generator/jni_generator.py", line 1518, in main
    GenerateJNIHeader(input_file, output_file, options)
  File "../../base/android/jni_generator/jni_generator.py", line 1401, in GenerateJNIHeader
    jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, options)
  File "../../base/android/jni_generator/jni_generator.py", line 652, in CreateFromClass
    jni_from_javap = JNIFromJavaP(stdout.split('\n'), options)
  File "../../base/android/jni_generator/jni_generator.py", line 577, in __init__
    self.fully_qualified_class = self.fully_qualified_class.replace('.', '/')
AttributeError: 'JNIFromJavaP' object has no attribute 'fully_qualified_class'
Traceback (most recent call last):
  File "../../base/android/jni_generator/jni_generator.py", line 1527, in 
    sys.exit(main(sys.argv))
  File "../../base/android/jni_generator/jni_generator.py", line 1518, in main
    GenerateJNIHeader(input_file, output_file, options)
  File "../../base/android/jni_generator/jni_generator.py", line 1401, in GenerateJNIHeader
    jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, options)
  File "../../base/android/jni_generator/jni_generator.py", line 652, in CreateFromClass
    jni_from_javap = JNIFromJavaP(stdout.split('\n'), options)
  File "../../base/android/jni_generator/jni_generator.py", line 577, in __init__
    self.fully_qualified_class = self.fully_qualified_class.replace('.', '/')
AttributeError: 'JNIFromJavaP' object has no attribute 'fully_qualified_class'
external/chromium_org/android_webview/native/cancellation_signal_android_jar_jni_headers.target.linux-arm.mk:24: recipe for target 'out/target/product/s5p4418_drone/obj/GYP/shared_intermediates/android_webview/jni/CancellationSignal_jni.h' failed
make: *** [out/target/product/s5p4418_drone/obj/GYP/shared_intermediates/android_webview/jni/CancellationSignal_jni.h] Error 1
make: *** Waiting for unfinished jobs....
external/chromium_org/ui/gl/surface_jni_headers.target.linux-arm.mk:24: recipe for target 'out/target/product/s5p4418_drone/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h' failed

make: *** [out/target/product/s5p4418_drone/obj/GYP/shared_intermediates/ui/gl/jni/Surface_jni.h] Error 1


解决方案:JAVA SDK安装设置出错。重新安装jdk1.7.

apt-get update 
apt-get install openjdk-7-jdk 
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-7-openjdk-amd64/bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-7-openjdk-amd64/bin/javac" 1
update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/bin/java
update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
//检查设置版本
update-alternatives --config java
update-alternatives --config javac


使用env查看环境变量,删除关于$JAVA_HOME,$CLASSPATH变量。

重新编译

make -j4

OK !

参考:http://blog.csdn.net/yuxiangyunei/article/details/45365235

你可能感兴趣的:(android系统开发)