Why Do 4.4.x Branches/Tags Fail With API Changes?

749 views
Skip to first unread message

Tom Deering

unread,
Jul 26, 2014, 3:09:24 PM7/26/14
to android-...@googlegroups.com
It seems that all of the Android 19 branches currently fail to build because people have been changing code that is part of the public API. An example from building the android-4.4.4_r1 tag follows. Why is this? I want to build unaltered Android 19 for the Nexus 4. Is there some stable branch or tag I can check out that people aren't actively messing with?

>repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.4_r1
>repo sync
>repo forall -c 'git checkout tags/android-4.4.4_r1'
>source build/envsetup.sh
>lunch full_mako-user
>make -16

...

Checking API: checkapi-last
Checking API: checkapi-current
Compiling SDK Stubs: out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes.jar
frameworks/base/api/current.txt:23496: error 9: Removed public method android.telephony.gsm.SmsManager.divideMessage
frameworks/base/api/current.txt:23497: error 9: Removed public method android.telephony.gsm.SmsManager.getDefault
frameworks/base/api/current.txt:23498: error 9: Removed public method android.telephony.gsm.SmsManager.sendDataMessage
frameworks/base/api/current.txt:23499: error 9: Removed public method android.telephony.gsm.SmsManager.sendMultipartTextMessage
frameworks/base/api/current.txt:23500: error 9: Removed public method android.telephony.gsm.SmsManager.sendTextMessage
frameworks/base/api/current.txt:23501: error 10: Removed field android.telephony.gsm.SmsManager.RESULT_ERROR_GENERIC_FAILURE
frameworks/base/api/current.txt:23502: error 10: Removed field android.telephony.gsm.SmsManager.RESULT_ERROR_NO_SERVICE
frameworks/base/api/current.txt:23503: error 10: Removed field android.telephony.gsm.SmsManager.RESULT_ERROR_NULL_PDU
frameworks/base/api/current.txt:23504: error 10: Removed field android.telephony.gsm.SmsManager.RESULT_ERROR_RADIO_OFF
frameworks/base/api/current.txt:23505: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_FREE
frameworks/base/api/current.txt:23506: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_READ
frameworks/base/api/current.txt:23507: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_SENT
frameworks/base/api/current.txt:23508: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_UNREAD
frameworks/base/api/current.txt:23509: error 10: Removed field android.telephony.gsm.SmsManager.STATUS_ON_SIM_UNSENT
out/target/common/obj/PACKAGING/public_api.txt:23512: error 12: Class android.telephony.gsm.SmsManager changed static qualifier
out/target/common/obj/PACKAGING/public_api.txt:23512: error 27: Class android.telephony.gsm.SmsManager removed final qualifier

******************************
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

Jean-Baptiste Queru

unread,
Jul 28, 2014, 12:22:40 PM7/28/14
to android-...@googlegroups.com
Which very exact version of javac are you using?

There are some known issues with different toolchains disagreeing on what APIs are public when generating the report, with OpenJDK being especially suspicious.

JBQ

--

Jean-Baptiste M. "JBQ" Quéru
Architect, Mobile, Yahoo


--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Tom Deering

unread,
Jul 31, 2014, 12:31:53 PM7/31/14
to android-...@googlegroups.com, j...@yahoo-inc.com
I'm using Oracle Java 6.

> javac -version
javac 1.6.0_45

Tom Deering

unread,
Jul 31, 2014, 12:36:21 PM7/31/14
to android-...@googlegroups.com
JBQ, would you be able to link me to the known issues you're aware of?

Jean-Baptiste Queru

unread,
Jul 31, 2014, 3:05:19 PM7/31/14
to android-...@googlegroups.com
Sadly, I don't have any link off-hand. This was common knowledge in "a previous life" and might have occasionally been discussed on this list as well, but I don't have any authoritative source.

JBQ
 
--

Jean-Baptiste M. "JBQ" Quéru
Architect, Mobile, Yahoo
On Thursday, July 31, 2014 10:14 AM, Tom Deering <tomde...@gmail.com> wrote:


JBQ, would you be able to link me to the known issues you're aware of?

On Saturday, July 26, 2014 2:09:24 PM UTC-5, Tom Deering wrote:
It seems that all of the Android 19 branches currently fail to build because people have been changing code that is part of the public API. An example from building the android-4.4.4_r1 tag follows. Why is this? I want to build unaltered Android 19 for the Nexus 4. Is there some stable branch or tag I can check out that people aren't actively messing with?

>repo init -u https://android.googlesource. com/platform/manifest -b android-4.4.4_r1
>repo sync
>repo forall -c 'git checkout tags/android-4.4.4_r1'
>source build/envsetup.sh
>lunch full_mako-user
>make -16

...

Checking API: checkapi-last
Checking API: checkapi-current
Compiling SDK Stubs: out/target/common/obj/JAVA_ LIBRARIES/android_stubs_ current_intermediates/classes. jar
frameworks/base/api/current. txt:23496: error 9: Removed public method android.telephony.gsm. SmsManager.divideMessage
frameworks/base/api/current. txt:23497: error 9: Removed public method android.telephony.gsm. SmsManager.getDefault
frameworks/base/api/current. txt:23498: error 9: Removed public method android.telephony.gsm. SmsManager.sendDataMessage
frameworks/base/api/current. txt:23499: error 9: Removed public method android.telephony.gsm. SmsManager. sendMultipartTextMessage
frameworks/base/api/current. txt:23500: error 9: Removed public method android.telephony.gsm. SmsManager.sendTextMessage
frameworks/base/api/current. txt:23501: error 10: Removed field android.telephony.gsm. SmsManager.RESULT_ERROR_ GENERIC_FAILURE
frameworks/base/api/current. txt:23502: error 10: Removed field android.telephony.gsm. SmsManager.RESULT_ERROR_NO_ SERVICE
frameworks/base/api/current. txt:23503: error 10: Removed field android.telephony.gsm. SmsManager.RESULT_ERROR_NULL_ PDU
frameworks/base/api/current. txt:23504: error 10: Removed field android.telephony.gsm. SmsManager.RESULT_ERROR_RADIO_ OFF
frameworks/base/api/current. txt:23505: error 10: Removed field android.telephony.gsm. SmsManager.STATUS_ON_SIM_FREE
frameworks/base/api/current. txt:23506: error 10: Removed field android.telephony.gsm. SmsManager.STATUS_ON_SIM_READ
frameworks/base/api/current. txt:23507: error 10: Removed field android.telephony.gsm. SmsManager.STATUS_ON_SIM_SENT
frameworks/base/api/current. txt:23508: error 10: Removed field android.telephony.gsm. SmsManager.STATUS_ON_SIM_ UNREAD
frameworks/base/api/current. txt:23509: error 10: Removed field android.telephony.gsm. SmsManager.STATUS_ON_SIM_ UNSENT
out/target/common/obj/ PACKAGING/public_api.txt: 23512: error 12: Class android.telephony.gsm. SmsManager changed static qualifier
out/target/common/obj/ PACKAGING/public_api.txt: 23512: error 27: Class android.telephony.gsm. SmsManager removed final qualifier

******************************
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

Tom Deering

unread,
Jul 31, 2014, 5:40:20 PM7/31/14
to android-...@googlegroups.com
I believe I figured it out- the short answer is that you were right that it was a toolchain problem.

On the shared linux system I was using, the global default is Oracle Java 7, which I cannot change without disrupting others. I have a bin folder on the front of my path, and had symlinked javac and java to point to the Java 6 versions. Apparently the build process must use other Java binaries. I tried again after creating symlinks to all Java 6 binaries, and this problem went away.

So... you were right. If there are mixed Java 6 and Java 7 binaries used by the build process, there must be some disagreement about what is public API.

Tom Deering | PhD Student | ISU ECpE Software Systems | (563) 249-9277


You received this message because you are subscribed to a topic in the Google Groups "Android Building" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-building/V7g98VEhBYc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to android-buildi...@googlegroups.com.

Himanshu Jha

unread,
Feb 6, 2015, 11:17:09 AM2/6/15
to android-...@googlegroups.com
Hi Tom

I'm getting the same error messages as you did.
My java version is : java version "1.6.0_45"

However, I also have java 7  on my system. Though using sudo update-alternatives --config java, I can see that it points to java 6. 
I didn't quite get what you meant by "symlinked javac and java to point to Java 6 versions"

Could you help me with that? I have been struggling with building Android for quite a while now. And this is the closest I have come to figuring it out.

Thanks!

Tom Deering

unread,
Feb 6, 2015, 1:09:36 PM2/6/15
to android-...@googlegroups.com
Hi Himanshu,

The way I got past this was by creating a bin/ folder in my home directory, then adding this folder at the front of my PATH. Whenever you run a command (eg "java"), this is the first place the shell will begin looking for a binary by that name. 

Next, I located all of the binaries in my Java 6 installation. This will be some place like /usr/lib/jvm/java-6-oracle/bin. If you create a symbolic link in your bin/ folder for each of these binaries, then you will be guaranteed that the system will definitely use these rather than one of the binaries out of your Java 7 install. Furthermore, if you have other users on your system, they will be unaffected and continue to use Java 7 without issue.

If you do these two steps and try again, I bet it will fix the problem for you too.

Tom Deering | PhD Student | ISU ECpE Software Systems | (563) 249-9277

trevd

unread,
Feb 14, 2015, 1:38:57 AM2/14/15
to android-...@googlegroups.com
Hi Folks 

Just for future reference you can use update alternatives for javac too, also javadoc,  javah, javap usually have alternatives if you have multiple versions installed side-by-side
sudo update-alternatives --config javac 

Thanks
trevd

Tom Deering

unread,
Feb 16, 2015, 12:36:35 PM2/16/15
to android-...@googlegroups.com
sudo update-alternatives --config javac 

Trevd, that's true. At least in my situation I was operating on a shared machine, so changing a global system alternative for javac in this way was not desired because it would disrupt other users.

Tom Deering | PhD Student | ISU ECpE Software Systems | (563) 249-9277

--
Reply all
Reply to author
Forward
0 new messages