Java version in Android source code

Source: Internet
Author: User

AndroidSource codeCurrently, the Java version of the development environment is 1.5. When the development environment was set up, Java version 1.6 was installed without notice of the Java version requirements. The result is that the Java version fails to be detected during compilation.

Open the file build/CORE/Main. mk, find the Java version check, and block the originalCode, Add a new row to judge:

# Check for the correct version of Java

# Java_version: = $ (shell Java-Version 2> & 1 | head-N 1 | grep '["] 1/. 5 [/." $]')

Java_version: = $ (shell Java-Version 2> & 1 | head-N 1 | grep '["] 1/. 6 [/." $]')

The Java version is determined in two ways, and the other is also changed to: # Check for the correct version of javac # javac_version: = $ (shell javac-Version 2> & 1 | head-N 1 | grep '["] 1 /. 5 [/. "$] ') javac_version: = $ (shell javac-Version 2> & 1 | head-N 1 | grep' ["] 1 /. 6 [/. "$] ') so that you can compile Android smoothly. Later, when compiling the android SDK, the following error occurs: Docs droiddoc: Out/target/common/docs/dxjavadoc: Error-in the doclet droiddoc class, the method start has thrown an exception in Java. lang. reflect. invocationtargetexceptioncom. sun. tools. javac. code. symbol $ completionfailure: sun not found. util. resources. openlistresourcebundle class file 1 error make: * ** [out/target/common/docs/DX-timestamp] Error 45 does not need to compile the SDK documentation during compilation, this problem occurs because the Java version is not 1.5. Instead of changing the Java version in the development environment to 1.5, we decided to block the compilation of droiddoc. Open the build/CORE/droiddoc. mk file and find all_docs + =$ (full_target) to block this line. You can

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.