Monday, October 17, 2016

How To Update Android Studio 2.1 To 2.2 On Ubuntu 16.04

This article will show you how to upgrade Android Studio from version 2.1.x to 2.2.x (where 'x' is any number). Note that there are some differences between the two version mentioned. This article serves to guide you through the process of upgrading Android Studio painlessly.

The clue as to when the upgrade is required is when you launch Android Studio and you will find two notifications (shown in the figure below) which will be displayed on Android Studio's welcome screen.


Notice that the top notification says that 'Android Studio is ready to update' while the notification at the bottom says something similar, although 'components' are mentioned.

Click on the 'update' item on the top notification. The screen will change as shown in the figure below.


Notice the message that a new version of Android Studio is available. Although the default button is marked 'Remind Me Later' (as shown), you need to click on 'Update and Restart' button in order to perform the update. The update process for Android Studio will begin.

First the 'Patch File' will begin downloading (see figure below) – depending on the speed of your connection, this may take a while, so be patient.


Next, the update files will be downloaded and installed (see below). Then click the 'Finish' button.


Once the files are updated, the current Android Studio will close and you will be prompted to import your settings from the old Android Studio to the new one - just click on the 'OK' button (see below).


The new Android Studio will begin loading and soon you will be greeted with the welcome screen (see below). Note that the version number will have changed, but the notification about the components update will still be displayed.


Click on the 'update' item on the notification. The screen will change as shown in the figure below.


Although the default button is marked 'Remind Me Later' (as shown), you need to click on 'Update Now' button in order to perform the update. The update process for components of Android Studio will begin.

The screen will change as shown below. First the various components are downloaded and then installed. Again, depending on the speed of your connection, this may take a while, so be patient.


Once all the components have been downloaded and installed, the screen will change as shown in the figure below. Click on the 'Finish' button.


You will be back at the Android Studio welcome screen. Now click on 'Configure' (at the bottom right of the welcome screen), and then select 'SDK Manager' from the resulting drop-down list (see below).


The 'Default Settings' SDK Manager screen will be displayed (see below). Then click on the 'Launch Standalone SDK Manager' item (located at the bottom of the screen).


The screen will change to show the standalone SDK manager as shown below. Notice the 'Install x packages...' (where x can represent any number) button at the bottom right of the screen. Click on that button.


Next, accept the license for all the listed packages (see below) and the click the 'Install' button.


The packages will be downloaded and installed (see below). Again, depending on the speed of your connection, this may take a while, so be patient.


Once all the packages have been installed, the screen will change as shown below. Click on the 'x' on the top left hand corner of the screen to dismiss it.


You will be back at the 'Default Settings' SDK Manager screen. Select the 'Show Package Details' and the screen will change as shown below. Notice that only some of the Android 7.0 (Nougat) and all the Android 6.0 (Marshmallow) packages have been installed. This was from a prior instillation whereby all the packages from Android 7.0 and Android 6.0 were installed. Depending on your needs, select all those packages you need and delete all the rest. In this case of this article, all the packages from Android 7.0 were selected by selecting the Android 7.0 (Nougat) item.


Then click on the 'OK' button on the Confirm Changes screen (see below).


The components will then be downloaded and installed (see below). Wait for the process to finish, then click on the 'Finish' button. Then close the 'Default Settings' SDK Manager by clicking on the 'OK' button.


You will be back at the Android Studio welcome screen (see below). Double-click on the 'Hello World' project listed on the left of the welcome screen to launch the project.


You will be greeted by the 'Convert Project' window as shown below. The gist of the problem is that the current project 'HelloWorld' has an older format (2.1.3) and will be converted to the newer format (2.2.1). Click the convert button.


The conversion process will begin (see below). After a while, Android Studio's main IDE screen will appear (see below also).



Wait a bit more until the screen as shown below appears. If the 'Tip of the Day' screen appears, click on the 'Close' button to dismiss it. Alternatively, if you do not wish to see a tip screen every time you start Android Studio, you can clear the check mark from the 'Show Tips on Startup' item. Note the 'Indexing...' message at the bottom of the screen.


Wait until the indexing has finished. The screen will now show the 'new' project file (see below).


A window may pop up as shown below. Click on the 'Update' button to update Android Gradle (recommended).


After Android Gradle has finished updating and the main IDE screen is shown, click on 'Tools' > 'Android' > 'AVD Manager' (in Android Studio's menu), and the 'Your Virtual Devices' screen will appear (see below).


Note that the Nexus 5X AVD has already been created but they are using API 23 and the target is set at Android 6.0. To change these, click on the edit icon (the one that looks like a pencil) under the Actions column at the extreme right of the screen. The screen will change to the Verify Configuration screen (see below).


On this screen change the name to 'Nexus 5X API 24'. Then click on the 'Change...' button labeled 'Marshmallow Android 6.0 x86'. The screen will change to the one shown below.


On this screen, select the first item under the Release Name of Nougat. Then click on the 'OK' button. You will be back at Verify Configuration screen (see below).


Click on the 'Finish' button.


The 'new' AVD will be saved and the 'Your Virtual Devices' screen will appear (see below). Note that all the changes you have made will be reflected on the screen.


Click on the 'x' on this screen to close it. You will now be back at Android Studio's main IDE screen (see below).


Congratulations! You now have a fully updated Android Studio. You can go ahead to use it for developing Android software.

1 comment: