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