Android Security Cookbook
上QQ阅读APP看书,第一时间看更新

Updating the API sources

The SDK manager and related tools come bundled with the ADT package; they provide access to the latest and most stable APIs, Android emulator images, and various debugging and application testing tools. The following walkthrough shows you how to update your APIs and other Android development-related resources.

How to do it...

Updating the APIs for your ADT works as follows:

  1. Navigate to the SDK manager. If you're doing this all from Windows, you should find it in the root of the ADT-bundle folder called SDK Manager.exe. Ubuntu users will find it at [path to ADT-bundle]/sdk/tools/android.
  2. All you need to do is launch the SDK manager. It should start up and begin retrieving a fresh list of the available API and documentation packages.
    How to do it...
  3. You will need to make sure that you select the Tools package; of course, you could also select any other additional packages. A good idea would be to download the last two versions. Android is very backward compatible so you don't really need to worry too much about the older APIs and documentation, unless you're using it to support really old Android devices.
  4. You will need to indicate that you accept the license agreement. You can either do this for every single object being installed or you can click on Accept All.
  5. Once you've accepted the licenses, you can collect your documentation and APIs by clicking on Install as shown in the following screenshot:
    How to do it...