Tek Eye Logo

Tek Eye

Keeping the Android SDK Updated

The SDK must be kept updated to allow App developers to work with the latest APIs on the evolving Android platform. Use the Android SDK Manager program to update the existing installed SDK packages and to install new SDK packages. The Android Operating System (OS) is constantly improving and so is the Android Software Development Kit (SDK). The ongoing development of Android is driven by:

  • Google's research and development.
  • Device manufacturers developing new and improved hardware.
  • Addressing security issues and possible exploits.
  • The need to support new devices (e.g. support for tablets devices was added with version 3.0).
  • Support for new hardware interfaces (e.g. adding Near Field Communication in version 2.3).
  • Fixing bugs.
  • Improvements in functionality (e.g. a new JavaScript engine).
  • Changes in the underlying Linux kernel.
  • Deprecation of redundant programming interfaces.
  • New uses (e.g. Android TV).
  • The wider Android development community.

Installation of the Android SDK is normally done when Android Studio is installed, see Android Studio Windows Install for PCs. After Studio (with the SDK) is installed on the development machine, and the programming environment is running smoothly, once in a while developers will need to check for updates to the SDK.

Studio will display a message when a SDK update is available. Alternatively it can be kept up to date by running the SDK Manager.exe program. The status of the installed SDK packages can be viewed via the SDK Manager toolbar icon.

SDK Manager Icon

The status of installed and available SDK packages and tools can be viewed:

Android SDK Status in Studio

Then Android SDK Manager can be started with Launch Standalone SDK Manager link. The SDK Manager.exe program can be run outside of Android Studio. Start SDK Manager.exe from the Android SDK install directory (on recent versions of Windows typing sdk at the start screen will find it). When SDK Manager starts it runs a check to see which Android packages are available to download. Then a list of all available packages are shown with updates pre-selected for download. A Status column shows whether a package is installed or not.

Android SDK Manager

SDK Manager will list new packages alongside other available packages. There will be optional packages for different development scenarios. To install a package check it, uncheck the ones not required. There are multiple packages available:

  • SDK Platform packages for each API level (i.e. each version of Android).
  • Application samples for most API levels.
  • Google APIs.
  • Documentation and source code.

At the bottom of the list are the Extra packages for specific functionality.

Android SDK Extra Packages

Most can be installed unless short on disk space. The SDK Manager can always be run again to download and install additional items.

  • GPU Debugging Tools - For use with Studio to capture GPU traces for profiling, cannot be used with deployed Apps.
  • Android Support Repository – The Android Support Library as a Maven package.
  • Android Support Library – Used to support some later Android APIs on older devices.
  • Android Auto Desktop Head Unit emulator - Emulator for Apps targeting automobile head units running Android.
  • Google Play Services – APIs to interface to Google Play, advertising, analytics, Cloud Messaging (messaging and data transfer from devices to servers), and other Google services.
  • Google Repository – Maven repository for Google libraries.
  • Google Play APK Expansion Library – Support for Apps that need to exceed the 50MB compiled (APK) limit (adds up to 2GB of extra payload to an APK).
  • Google Play Billing Library – Add support for in App purchases.
  • Google Play Licensing Library – Helps protects Apps from been illegally copied.
  • Android Auto API Simulators - Messaging simulators to test auto Apps.
  • Google USB Driver – For debugging on Google devices (or use a manufacturer's driver for some Google devices).
  • Google Web Driver – Automated website testing on Android devices.
  • Intel x86 Emulator Hardware Accelerator (HAXM Installer) – HAXM increases performance of Intel x86 system images (x86 Android Virtual Devices) on recent Intel based PCs that support virtualization. HAXM is also available directly from Intel.

If in doubt about what to download then as a minimum have the following installedf:

  • Android SDK Tools (latest version under Tools)
  • Android SDK Platform-tools (latest version under Tools)
  • Android SDK Build-tools (latest version under Tools)
  • All items in the latest Android API
  • Android Support Repository (under Extras)
  • Android Support Library (under Extras)
  • Google Play services (under Extras)
  • Google Repository (under Extras)
  • Google USB Driver (under Extras), if you own a Google device (some devices require a manufacture's driver).
  • Intel x86 Emulator Accelerator, (under Extras), HAXM is good for improved x86 emulator performance on Intel CPUs.

Apps are normally compiled against the latest API but can still run on older devices (if no new API features are used). Download several SDK Platforms if you need to test Apps on various device configurations and API levels. (Check the Obsolete box to see older versions if needed.) Installing system images for Android 2.3 and later covers nearly all of the devices currently in use (see the Android Dashboards). Google Play services are available for Android 2.3 and later. If anything is not installed SDK Manager can be re-run to get other packages as and when required. Alternatively simply check all packages to download everything (the download will take quite some time).

With the required packages checked click the Install x packages.. button. If an update or package has license terms that requires acceptance they will be listed. If required click each entry to read the license terms. The package can be accepted or rejected using the radio buttons. Rejected packages are marked with a red cross. Alternatively highlight the parent entry and click on Accept License to accept everything. All packages and updates ready to download and install will be shown with a green tick.

Android SDK Accept Licence

Click the Install button to begin the download and installation. Whilst the download and installation is progressing the log can be viewed by pressing the log icon in the bottom right of the Andriod SDK Manager dialog.

Android SDK Manager Log

Any errors during the download and installation will be shown in red in the log dialog. Updates that affect the Android Debug Bridge (ADB) may result in a request to restart ADB. Click Yes to restart ADB. Obsolete packages will have been deleted during the download and installatiion. Close the log dialog, if open, and the Android SDK Manager dialog when all packages have been updated.

Be aware that older computers used for development will struggle to run the virtual device emulators for the later Android APIs, therefore test with the earlier SDK Platforms on such computers or use real Android devices. For PC's with Intel CPUs that support virtualization using the Intel x86 Atom System Image can improve the performance of the emulator if the Intel HAXM utility is installed. (If downloaded via the Android SDK Manager it will be under the extras folder in the Android SDK install location.)

When the SDK Manager has finished close it by clicking the X button in the top corner of the window. Android is an evolving platform, checking for updates every few weeks allows you to work with the latest tools and APIs.

Update Errors

Occasionally there will be errors during the update process, more likely if there has been a long gap between updates and the SDK versions have moved on several points. The quickest way to resolve the errors is to manually update the SDK tools.

  1. Download the SDK Zip file from the Android Developer downloads web page.
  2. Close Studio, any AVDs and any other program.
  3. Close Android Debug Bridge, in Windows use Task Manager to end the adb.exe process.
  4. Copy the contents of the SDK Zip file over the current SDK install location (on Windows if the default location has not been changed it will be under the users hidden AppData\Local folder).
  5. Run SDK Manager.exe as administrator (open the context menu, usually right-click, and select Run as administrator, click Yes to the message that appears).
  6. Update the required packages.

On some Windows PCs an error can occur when the SDK Manager is unable to access or rename directories or files, they will be shown in the log window. Ensure that nothing is open, especially Windows Explorer, re-run SDK Manager.exe, if necessary as administrator (bring up the context menu, usually right-click, and select Run as administrator) and check that any directories or files shown in the error messages (usually the android-sdk directory) does not have any read only flags.

See Also

Additional Options to Setup Android Development on Windows

If you find that developing in Java is difficult using the Google recommended IDEs, there are other options. You can try writing Apps in a different language. See the article List of IDEs for Android App Development, it lists alternative development packages and languages

Author:  Published:  Updated:  

ShareSubmit to TwitterSubmit to FacebookSubmit to LinkedInSubmit to redditPrint Page

Do you have a question or comment about this article?

(Alternatively, use the email address at the bottom of the web page.)

 This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

markdown CMS Small Logo Icon ↓markdown↓ CMS is fast and simple. Build websites quickly and publish easily. For beginner to expert.


Articles on:

Android Programming and Android Practice Projects, HTML, VPS, Computing, IT, Computer History, ↓markdown↓ CMS, C# Programming, Using Windows for Programming


Free Android Projects and Samples:

Android Examples, Android List Examples, Android UI Examples



Tek Eye Published Projects