There are two steps in apicheck: -whether you changed a public API at all (that's the part that uses current.xml), so that there is a mechanism to have any API change reviewed and approved before they're submitted.
-whether you broke binary compatibility by changing an API (that's the part that uses 3.xml), so that applications compiled against previous levels of the API (in this case 1 is 1.0 and 2 is 1.1) can continue to work on this version. The first one is something that's open for review, but the second one typically isn't. There might be exceptional changes where some constants might be allowed to change between versions, which can be done without preventing apps from loading, but that still has some issues (e.g. the compiled version of the constant isn't the same as the one the app can get through reflection, and the semantics of the constant can introduce adverse effects if it changes). JBQ On Tue, Mar 3, 2009 at 9:50 PM, Jey.Michael <[email protected]> wrote: > > > I am trying to understand the api-check mechanism, currently built-in > to the framework. > > When I make source changes, by adding new public apis, the build warns > me about that change and stops. > > Then I do make update-api which updates the current.xml > > But the build still fails, because it tries to validate against the > (old version?) 3.xml (2.xml, 1.xml etc) > > make showcommands show this: > > Checking API: checkapi-last > ( out/host/darwin-x86/bin/apicheck -hide 2 -hide 3 -hide 4 -hide 5 - > hide 6 -hide 24 -hide 25 -error 7 -error 8 -error 9 -error 10 -error > 11 -error 12 -error 13 -error 14 -error 15 -error 16 -error 17 -error > 18 frameworks/base/api/3.xml out/target/common/obj/PACKAGING/ > public_api.xml || ( cat build/core/apicheck_msg_last.txt ; exit > 38 ) ) > (unknown): error 17: Field android.view.KeyEvent.MAX_KEYCODE has > changed value > > Is this, by design? I thought, the build's intermediate > 'public_api.xml' would be checked against the current.xml forcing the > developer to modfy the current.xml. If this is by design, I am not > sure what needs to be done for this additional check against the > 3.xml ? 3.xml needs to changed as well? That does not sound right. > > Any links, documents, write-ups about the api-check mechanism would > help. > > thanks > Jey > > > > -- Jean-Baptiste M. "JBQ" Queru Android Engineer, Google. Questions sent directly to me will likely get ignored or forwarded to a public forum with no further warning. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
