Hi,
I wish to compile Android Kitkat source https://community.freescale.com/docs/DOC-101561/version/3
As per the document provided there i follow the steps, after the configuration when i make the sorce i am getting error.
source build/envsetup.sh
lunch sabresd_6dq-user
make 2>&1 | tee build_sabresd_6dq_android.log
...
out/target/common/obj/PACKAGING/public_api.txt:23522: error 12: Class android.telephony.gsm.SmsMessage changed static qualifier
out/target/common/obj/PACKAGING/public_api.txt:23523: error 4: Added public constructor SmsMessage()
out/target/common/obj/PACKAGING/public_api.txt:23524: error 4: Added public method android.telephony.gsm.SmsMessage.calculateLength
out/target/common/obj/PACKAGING/public_api.txt:23525: error 4: Added public method android.telephony.gsm.SmsMessage.calculateLength
out/target/common/obj/PACKAGING/public_api.txt:23526: error 4: Added public method android.telephony.gsm.SmsMessage.createFromPdu
out/target/common/obj/PACKAGING/public_api.txt:23527: error 4: Added public method android.telephony.gsm.SmsMessage.getDisplayMessageBody
out/target/common/obj/PACKAGING/public_api.txt:23528: error 4: Added public method android.telephony.gsm.SmsMessage.getDisplayOriginatingAddress
out/target/common/obj/PACKAGING/public_api.txt:23529: error 4: Added public method android.telephony.gsm.SmsMessage.getEmailBody
out/target/common/obj/PACKAGING/public_api.txt:23530: error 4: Added public method android.telephony.gsm.SmsMessage.getEmailFrom
out/target/common/obj/PACKAGING/public_api.txt:23531: error 4: Added public method android.telephony.gsm.SmsMessage.getIndexOnSim
out/target/common/obj/PACKAGING/public_api.txt:23532: error 4: Added public method android.telephony.gsm.SmsMessage.getMessageBody
out/target/common/obj/PACKAGING/public_api.txt:23533: error 4: Added public method android.telephony.gsm.SmsMessage.getMessageClass
out/target/common/obj/PACKAGING/public_api.txt:23534: error 4: Added public method android.telephony.gsm.SmsMessage.getOriginatingAddress
out/target/common/obj/PACKAGING/public_api.txt:23535: error 4: Added public method android.telephony.gsm.SmsMessage.getPdu
out/target/common/obj/PACKAGING/public_api.txt:23536: error 4: Added public method android.telephony.gsm.SmsMessage.getProtocolIdentifier
out/target/common/obj/PACKAGING/public_api.txt:23537: error 4: Added public method android.telephony.gsm.SmsMessage.getPseudoSubject
out/target/common/obj/PACKAGING/public_api.txt:23538: error 4: Added public method android.telephony.gsm.SmsMessage.getServiceCenterAddress
out/target/common/obj/PACKAGING/public_api.txt:23539: error 4: Added public method android.telephony.gsm.SmsMessage.getStatus
out/target/common/obj/PACKAGING/public_api.txt:23540: error 4: Added public method android.telephony.gsm.SmsMessage.getStatusOnSim
out/target/common/obj/PACKAGING/public_api.txt:23541: error 4: Added public method android.telephony.gsm.SmsMessage.getSubmitPdu
out/target/common/obj/PACKAGING/public_api.txt:23542: error 4: Added public method android.telephony.gsm.SmsMessage.getSubmitPdu
out/target/common/obj/PACKAGING/public_api.txt:23543: error 4: Added public method android.telephony.gsm.SmsMessage.getTPLayerLengthForPDU
out/target/common/obj/PACKAGING/public_api.txt:23544: error 4: Added public method android.telephony.gsm.SmsMessage.getTimestampMillis
out/target/common/obj/PACKAGING/public_api.txt:23545: error 4: Added public method android.telephony.gsm.SmsMessage.getUserData
out/target/common/obj/PACKAGING/public_api.txt:23546: error 4: Added public method android.telephony.gsm.SmsMessage.isCphsMwiMessage
out/target/common/obj/PACKAGING/public_api.txt:23547: error 4: Added public method android.telephony.gsm.SmsMessage.isEmail
out/target/common/obj/PACKAGING/public_api.txt:23548: error 4: Added public method android.telephony.gsm.SmsMessage.isMWIClearMessage
out/target/common/obj/PACKAGING/public_api.txt:23549: error 4: Added public method android.telephony.gsm.SmsMessage.isMWISetMessage
out/target/common/obj/PACKAGING/public_api.txt:23550: error 4: Added public method android.telephony.gsm.SmsMessage.isMwiDontStore
out/target/common/obj/PACKAGING/public_api.txt:23551: error 4: Added public method android.telephony.gsm.SmsMessage.isReplace
out/target/common/obj/PACKAGING/public_api.txt:23552: error 4: Added public method android.telephony.gsm.SmsMessage.isReplyPathPresent
out/target/common/obj/PACKAGING/public_api.txt:23553: error 4: Added public method android.telephony.gsm.SmsMessage.isStatusReportMessage
out/target/common/obj/PACKAGING/public_api.txt:23554: error 5: Added public field android.telephony.gsm.SmsMessage.ENCODING_16BIT
out/target/common/obj/PACKAGING/public_api.txt:23555: error 5: Added public field android.telephony.gsm.SmsMessage.ENCODING_7BIT
out/target/common/obj/PACKAGING/public_api.txt:23556: error 5: Added public field android.telephony.gsm.SmsMessage.ENCODING_8BIT
out/target/common/obj/PACKAGING/public_api.txt:23557: error 5: Added public field android.telephony.gsm.SmsMessage.ENCODING_UNKNOWN
out/target/common/obj/PACKAGING/public_api.txt:23558: error 5: Added public field android.telephony.gsm.SmsMessage.MAX_USER_DATA_BYTES
out/target/common/obj/PACKAGING/public_api.txt:23559: error 5: Added public field android.telephony.gsm.SmsMessage.MAX_USER_DATA_SEPTETS
out/target/common/obj/PACKAGING/public_api.txt:23560: error 5: Added public field android.telephony.gsm.SmsMessage.MAX_USER_DATA_SEPTETS_WITH_HEADER
******************************
You have tried to change the API from what has been previously approved.
To make these errors go away, you have two choices:
1) You can add "@hide" javadoc comments to the methods, etc. listed in the
errors above.
2) You can update current.txt by executing the following command:
make update-api
To submit the revised current.txt to the main Android repository,
you will need approval.
******************************
make: *** [out/target/common/obj/PACKAGING/checkapi-current-timestamp] Error 38
Then as per suggestion i use make update-api
again i am getting the below error.
out/target/common/obj/PACKAGING/public_api.txt:23516: error 12: Class android.telephony.gsm.SmsManager changed static qualifier
prebuilts/sdk/api/19.txt:23496: error 9: Removed public method android.telephony.gsm.SmsManager.divideMessage
prebuilts/sdk/api/19.txt:23497: error 9: Removed public method android.telephony.gsm.SmsManager.getDefault
prebuilts/sdk/api/19.txt:23498: error 9: Removed public method android.telephony.gsm.SmsManager.sendDataMessage
prebuilts/sdk/api/19.txt:23499: error 9: Removed public method android.telephony.gsm.SmsManager.sendMultipartTextMessage
prebuilts/sdk/api/19.txt:23500: error 9: Removed public method android.telephony.gsm.SmsManager.sendTextMessage
prebuilts/sdk/api/19.txt:23501: error 10: Removed field android.telephony.gsm.SmsManager.RESULT_ERROR_GENERIC_FAILURE
prebuilts/sdk/api/19.txt:23502: error 10: Removed field android.telephony.gsm.SmsManager.RESULT_ERROR_NO_SERVICE
prebuilts/sdk/api/19.txt:23503: error 10: Removed field android.telephony.gsm.SmsManager.RESULT_ERROR_NULL_PDU
prebuilts/sdk/api/19.txt:23504: error 10: Removed field android.telephony.gsm.SmsManager.RESULT_ERROR_RADIO_OFF
prebuilts/sdk/api/19.txt:23505: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_FREE
prebuilts/sdk/api/19.txt:23506: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_READ
prebuilts/sdk/api/19.txt:23507: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_SENT
prebuilts/sdk/api/19.txt:23508: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_UNREAD
prebuilts/sdk/api/19.txt:23509: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_UNSENT
******************************
You have tried to change the API from what has been previously released in
an SDK. Please fix the errors listed above.
******************************
Solved! Go to Solution.
Hi Ashutosh,
First, you need to make sure you using the correct Java version; something like this:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
If not, I have found this to be the easiest way to get the correct version installed:
Installing The JDK
Add PPA to system
$ sudo add-apt-repository ppa:webupd8team/java
Download & install java
$ sudo apt-get update && sudo apt-get install oracle-java6-installer
CHECK
$ java -version
You should see something like:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
If not (I have had trouble with this i the past), go to:
(in your browser and manually download)
You will have to login or setup an account with Oracle if you do not have one.
Put the "jdk-6u45-linux-x64.bin" in the home directory.
Then we need to run the binary and move it to a shared location by opening a terminal and typing:
$ chmod +x jdk-6u45-linux-x64.bin
$ sudo ./jdk-6u45-linux-x64.bin
$ sudo mv jdk1.6.0_45 /usr/lib/jvm/
Now you have to install all binaries and give them highest priority, This will also overwrite the previous version of Java Binaries in your computer:
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
$ sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_45/bin/javap 1 (EDIT - This is needed to compile Kit Kat 4.4)
Most of the time I get after these commands, basically the jdk is not there. Just run the binary and move it to a shared location using three commands above again and install and give them the highest priority again...its a pain, I know)
Now check if JDK 1.6 is selected on this:
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config jar
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javap (EDIT - This is needed to compile Kit Kat 4.4)
These six should all be selected.
Now JDK is configured! To check if it is done
Execute this is Terminal:
$ java -version
Output will be similar to this:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
IF NOT, YOU MAY NEED TO RUN AGAIN
JDK is now configured. You can now delete or save somewhere else "jdk-6u45-linux-x64.bin" that is in the home directory
(Full android setup here: https://community.freescale.com/message/421522#421522 ) This is for Ubuntu 14.04, but the JDK setup is the same.
NOTICE that you will need javap installed and given the highest priority to compile Kit Kat.
I hope this helps,
Dave
Hi Ashutosh,
First, you need to make sure you using the correct Java version; something like this:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
If not, I have found this to be the easiest way to get the correct version installed:
Installing The JDK
Add PPA to system
$ sudo add-apt-repository ppa:webupd8team/java
Download & install java
$ sudo apt-get update && sudo apt-get install oracle-java6-installer
CHECK
$ java -version
You should see something like:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
If not (I have had trouble with this i the past), go to:
(in your browser and manually download)
You will have to login or setup an account with Oracle if you do not have one.
Put the "jdk-6u45-linux-x64.bin" in the home directory.
Then we need to run the binary and move it to a shared location by opening a terminal and typing:
$ chmod +x jdk-6u45-linux-x64.bin
$ sudo ./jdk-6u45-linux-x64.bin
$ sudo mv jdk1.6.0_45 /usr/lib/jvm/
Now you have to install all binaries and give them highest priority, This will also overwrite the previous version of Java Binaries in your computer:
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
$ sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.6.0_45/bin/javap 1 (EDIT - This is needed to compile Kit Kat 4.4)
Most of the time I get after these commands, basically the jdk is not there. Just run the binary and move it to a shared location using three commands above again and install and give them the highest priority again...its a pain, I know)
Now check if JDK 1.6 is selected on this:
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config jar
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javap (EDIT - This is needed to compile Kit Kat 4.4)
These six should all be selected.
Now JDK is configured! To check if it is done
Execute this is Terminal:
$ java -version
Output will be similar to this:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
IF NOT, YOU MAY NEED TO RUN AGAIN
JDK is now configured. You can now delete or save somewhere else "jdk-6u45-linux-x64.bin" that is in the home directory
(Full android setup here: https://community.freescale.com/message/421522#421522 ) This is for Ubuntu 14.04, but the JDK setup is the same.
NOTICE that you will need javap installed and given the highest priority to compile Kit Kat.
I hope this helps,
Dave
Thanks Dave,
Its very helpful information.
Finally i am able to build it.
Hello,
I got exactly the same issue in a clean Ubuntu installation. The problem was the version of Java in the Host. I corrected it following the User Guide link to community doc.
community.freescale.com/docs/DOC-98441
I did first "make clean” after correcting the Java to the right one. Then:
lunch sabresd_6dq-user
make 2>&1 | tee build_sabresd_6dq_android.log
I hope this helps.
Luis