Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1208  / 3 Years ago, fri, may 28, 2021, 6:55:16

while building android filesystem, i am getting an error as



You are attempting to build with the incorrect version
of javac.

Your version is: javac 1.7.0_12-ea.
The correct version is: 1.6.

Please follow the machine setup instructions at
http://source.android.com/source/download.html


but i am having the version of 1.6 only.



$ java -version 
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)


actually i was having java 1.7, then after seeing this error i just installed java 1.6 amd removed java 1.7. but till now it is pointing to java 1.7. What will i do hereafter
? please guide me. Thank u in advance.


More From » java

 Answers
4

I used the following command and changed the version needed:



do following:

sudo update-alternatives --config java


This command will display all versions of java you have.



It will ask selection number as following:



Press enter to keep the current choice[*], or type selection number: 


type the version what u want.



It is used to rectify my problem.


[#32959] Saturday, May 29, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cheeturage

Total Points: 432
Total Questions: 111
Total Answers: 115

Location: Bahrain
Member since Tue, Mar 1, 2022
2 Years ago
;