Jdk/java version and Android source code compilation errors

Source: Internet
Author: User

Error One: JAVAP does not point to a valid Java version

Traceback (most recent): File".. /.. /base/android/jni_generator/jni_generator.py", line 1065,inch<module>Sys.exit (Main (SYS.ARGV)) File".. /.. /base/android/jni_generator/jni_generator.py", line 1061,inchmain options.optimize_generation) File".. /.. /base/android/jni_generator/jni_generator.py", line 996,inchGeneratejniheader JNI_FROM_JAVAP=Jnifromjavap.createfromclass (input_file, namespace) file".. /.. /base/android/jni_generator/jni_generator.py", Line 507,inchCreatefromclass stderr=subprocess. PIPE) File"/usr/lib/python2.7/subprocess.py", line 709,inch __init__Errread, Errwrite) File"/usr/lib/python2.7/subprocess.py", line 1326,inch_execute_childRaisechild_exceptionoserror: [Errno2] No such fileorDirectorymake:[/home/odexcide/android-4./out/target/product/generic/obj/gyp/shared_intermediates/ui/gl/jni/surface_jni.h] Error 1Make :Waiting forUnfinished jobs.

Cause JAVAP does not exist in the environment variable

Use the sudo update-alternatives--config javap to view the point, select the appropriate version, or add JAVAP if it does not exist .

sudo update-alternatives--install /usr/bin/javap javap/usr/lib/jvm/jdk1.6.0_45/bin/javap

Configure sudo update-alternatives--config JAVAP Note: If there is only one option, there is no list, i.e. no processing

Error Two Chromium Gyp hashset_jni.h

Out/target/product/mx3/obj/gyp/shared_intermediates/content/jni/hashset_jni.h:10:26:error:extra tokens at end of#ifndef directive [-werror]Out/target/product/mx3/obj/gyp/shared_intermediates/content/jni/hashset_jni.h:11:26:error:missing whitespace After the macro name [-werror]target Thumb C+ +: Content_content_common_gyp <= External/chromium_org/content/common/android/surface_texture_peer.ccin file included fromExternal/chromium_org/content/common/android/hash_set.cc:5: 0:out/target/product/mx3/obj/gyp/shared_intermediates/content/jni/hashset_jni.h:24:20:error:expected initializer Before'<'Tokenout/target/product/mx3/obj/gyp/shared_intermediates/content/jni/hashset_jni.h:26:17:error:expected initializer Before'<'Tokenout/target/product/mx3/obj/gyp/shared_intermediates/content/jni/hashset_jni.h:29:22:error:expected'{'Before'<'Tokenout/target/product/mx3/obj/gyp/shared_intermediates/content/jni/hashset_jni.h:29:22:error:expected Unqualified-id Before'<'tokenexternal/chromium_org/content/common/android/hash_set.cc:30:1: error:expected'}'At end of inputcc1plus:all warnings being treated as Errorsmake:[out/target/product/mx3/obj/static_libraries/content_content_common_gyp_intermediates/content/common/ ANDROID/HASH_SET.O] Error 1Make :Waiting for unfinished task ....

This may be due to a Java version mismatch, please install the appropriate version of the JDK.

In addition, if not resolved, can refer to this post to modify the source code, I do not recommend

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.