Once you install Android Studio, it's easy to keep the Android Studio IDEand Android SDK tools up to date with automatic updatesand the Android SDK Manager.
Download Android SDK. The Android SDK provides all the necessary developer tools to build, test, and debug apps for Android in Windows, Mac or Linux. Android Studio is a new and fully integrated development environment, which has been recently launched by Google for the Android operating system. It has been designed to provide new tools for app development and to provide an alternative to Eclipse, currently the most widely used IDE.
Android Studio notifies you with a small bubble dialog when anupdate is available for the IDE, but you can manuallycheck for updates byclicking Help > Check for Update (on Mac, AndroidStudio > Check for Updates).
Updates for Android Studio are available from the followingrelease channels:
In addition to receiving canary versions of Android Studio, you will also receive previewversions of other SDK tools, including the Android Emulator.
Although these builds are subject to morebugs, they do get tested and we want to offer them so you can try newfeatures and provide feedback. This channel is not recommended forproduction development.
If you'd like to try one of the preview channels (Canary, Dev, or Beta)while still using the Stable build for your production Android projects, youcan install both side by side.
To change the update channel for an existing install, proceed as follows:
Figure 1. The Android Studio Updatespreferences.
When you run a major version of Android Studio for the first time, it looks for directories containing caches, settings, indices, and logs for versions of Android Studio for which a corresponding installation can’t be found. The Delete Unused Android Studio Directories dialog then displays locations, sizes, and last-modified times of these unused directories and provides an option to delete them.
The directories Android Studio considers for deletion are listed below:
~/.AndroidStudio[Preview]_version_
~/Library/{Preferences, Caches, Logs, Application Support}/AndroidStudio[Preview]_version_
%USER%.AndroidStudio[Preview]_version_
The Android SDK Manager helps you download the SDK tools, platforms, andother components you need to develop your apps. Once downloaded, you can findeach package in the directory indicated as the Android SDK Location,shown in figure 2.
To open the SDK Manager from Android Studio, click Tools >SDK Manager or click SDK Managerin the toolbar. If you're not using Android Studio, you can download toolsusing the sdkmanager
command-line tool.
When an update is available for a package you already have, a dash appears in the check box next to the package.
Pending updates are indicated in the left column with a download icon. Pending removals areindicated with a red cross .
To update the selected packages,click Apply or OK, then agree to anylicense agreements.
Figure 2. The Android SDK Manager.
You should give special consideration to the following toolsin the SDK Tools tab:
Note: Most API libraries that were previously provided by theSupport Repository packages (such as the Android Support Library, Constraint Layout,Google Play services, and Firebase) are now instead available from Google's Maven repository.Projects created with Android Studio 3.0 and higher automatically include this repository in thebuild configuration. If you're using an older project, you must manually add Google's Maven repository to yourbuild.gradle
file.
In the SDK Platforms tab, you must also install at least oneversion of the Android platform. Each version provides several differentpackages. To download only those that are required, click the check box nextto the version name.
To see all available packages for each Android platform, clickShow Package Details at the bottom of the window.Within each platform version, you'll find the following packages:
Note: If you plan to use APIs fromGoogle Playservices (including Firebase), you must use either the Google APIs system imageor the Google Play system image (the latter includes the Play Store app).
The above list is not comprehensive and you can add other sites to download additional packagesfrom third parties.
In some cases, an SDK package may require a specific minimum revision ofanother tool. If so, the SDK Manager notifies you with a warning and addsthe dependencies to your list of downloads.
Tip: You can also customize thebuild.gradle
file so each project uses a specific build chain andcompilation options. For more information see, Configuring Gradle Builds.
To manage which SDK sites Android Studio checks forAndroid tools and third party tool updates, click the SDK Update Sitestab. You can add other sites thathost their own tools, then download the packages from thosesites.
For example, a mobile carrier or device manufacturer might offer additionalAPI libraries that are supported by their own Android-powered devices. Todevelop using their libraries, you can install their Android SDK packageby adding their SDK tools URL to the SDK Manager in theSDK Update Sites.
If a carrier or device manufacturer has hosted an SDK add-on repository fileon their website, follow these steps to add their site to the Android SDKManager:
Any SDK packages available from the site now appearin the SDK Platforms or SDK Tools tabs,as appropriate.
When you run a build from the command line, or when using Android Studio 3.3 or later, Gradle can automatically download missing SDK packages that a project depends on, as long as the corresponding SDK license agreements have already been accepted using the SDK Manager.
When you accept the license agreements using the SDK Manager, Android Studio creates a licenses directory inside the SDK home directory. This licenses directory is necessary for Gradle to auto-download missing packages.
Note: Accepting the license agreements using the android
command line tool does not create this licenses directory. You must first accept the agreements using the SDK Manager to be able to use this feature.
If you have accepted the license agreements on one workstation, but wish to build your projects on a different one, you can export your licenses by copying over the accepted licenses directory. To copy the licenses to another machine, follow these steps:
licenses/
directory inside it. (If you do not see a licenses/
directory, return to Android Studio and update your SDK tools, making sure to accept the license agreements. When you return to the Android SDK home directory, you should now see the directory.) licenses/
directory and paste it into the Android SDK home directory on the machine where you wish to build your projects. Gradle will now be able to automatically download missing packages your project depends on.
Note that this feature is automatically disabled for builds you run from Android Studio, as the SDK manager handles downloading missing packages for the IDE. You can also manually disable this feature by setting android.builder.sdkDownload=false
in the gradle.properties
file for your project.
This post is now obsolete. Please refer to Zebra’s EMDK documentation on best practices to use the EMDK.
There’s a recurring question coming to me and to Launchpad’s forums lately:
With the Android tools moving super-fast (Android studio v1.0 launched at the beginning of 2015, the latest stable release is v1.4.1, we already have v1.5RC and v2.0 has been announced…) keeping up to this pace is not easy for our EMDK team!
We discovered some integration issues when Android Studio v1.3 was released and we presented a workaround to use the EMDK as the building SDK. Limiting the project to API level 16 or 19. Prison architect layout. This should be good, right?
A downside of this approach surfaced when Google updated the templates for new projects, now based on the Android Support Library. I really like the approach to base new projects on the support library; the problem is that it does require to build the project with API level 21+.
Here we can have a problem
So, talking just about Android Studio, that is the current up-to-date Android IDE, we currently document two ways to use the EMDK:
Both methods fails to compile a project using the latest Android Support Library.
Download super mario bros 2 for mac. Here’s a third, UNOFFICIAL, way to include the EMDK in an Android project and use the latest available SDK to build the project.
First of all, create in your Android project a lib folder and copy into it the com.symbol.emdk.jar library that you got installing the EMDK on your PC/Mac:
This is probably easier to say than to do, because the default Android Studio project view doesn’t show these files.
The easiest way, at least for me, is to copy the file from the setup position to a newly created libs
folder in my project from Windows' File Explorer or OSX’s Finder and then check that everything is OK switching the Android Studio project view from “Android” to “Project Files”:
OK, once the file is included in our project (and this means that you can check in this file in your SCM and checkout on a new PC and rebuilt it without the need to Zebra EMDK installed) we can explain to Android Studio how to use it. To do this we need to modify the build.gradle
file included in the app folder. If you’ve switched back to the “Android Project view”, this is the Module: App, gradle file. As shown below:
In this file you need to setup the dependencies so that the build process uses this lib as a reference without including it into the final APK (otherwise the application will exit with and exception when launched).
With this changes you can build your project using the latest available SDK, just remember that you’re targeting Zebra devices with API level 16 or 19, so, setup your minimum SDK accordingly.
You can find a demo app built with this technique on my github account.
Happy coding
~Pietro