65

I made a stupid mistake by upgrading my SDK version to r15 as the android repository was not loading. How do I revert back to my older version r10? Or is sticking with the newer version better? I'll have to upgrade my ADT Plugin as well then. Thanks a lot.

Chocolava
  • 1,426
  • 2
  • 16
  • 20

5 Answers5

118

Anyway, for those who want to downgrade Android SDK Tools to a previous version, it can be possible following these steps:

  1. Find your Android SDK folder
  2. Locate the "tools" subfolder and rename it to "tools1" (just to keep a backup copy of the original tools folder)
  3. Likewise, rename platform-tools to platform-tools1
  4. Download from google repository the SDK Tool version you want to downgrade to (for instance: http://dl-ssl.google.com/android/repository/tools_r22.6.2-macosx.zip) and unpack it.
  5. The ZIP file you downloaded contains a tools folder that has to be moved to your Android SDK folder.
  6. Likewise, download the platform tools (for instance: http://dl-ssl.google.com/android/repository/platform-tools_r19.0.1-macosx.zip), and extract it in your SDK folder.

That's it.

BoD
  • 10,222
  • 6
  • 60
  • 57
Ariel Iriarte
  • 1,204
  • 1
  • 9
  • 3
75

I want to follow up on the great answer provided by Ariel Iriarte, step 3 (Download from google repository the SDK Tool version you want to downgrade to).

To find the old tools, you need to determine the SDK version number that you want to revert to. On the Google Android SDK webpage, you will find a Revisions list that shows all the SDK numbers, e.g.

  • SDK Tools, Revision 22.6.2 (March 2014)
  • SDK Tools, Revision 22.3 (October 2013)
  • etc.

Make a note of the exact revision number, like "22.3".

Now download the tools by using the following pattern:

where you must replace XXX with the exact revision number noted above. For example, to download revision 22.0.5 for Mac OS X, download the file:

http://dl-ssl.google.com/android/repository/tools_r22.0.5-macosx.zip

Once you download the file and unzip it, you will find a single folder called 'tools'. Now follow the answer by Ariel Iriarte and replace your android-sdk/tools folder with this new one. This is the folder that contains stuff like:

  • NOTICE.txt
  • adb_has_moved.txt
  • android
  • ant
  • apps
  • ddms
  • dmtracedump
  • etc.
Harmon758
  • 2,761
  • 2
  • 19
  • 31
stackoverflowuser2010
  • 29,060
  • 31
  • 142
  • 184
  • 5
    Similarly, if you need platform-tools version XXX for linux, use http://dl-ssl.google.com/android/repository/platform-tools_rXXX-linux.zip template. E.g. for 19.0.1 it will become http://dl-ssl.google.com/android/repository/platform-tools_r19.0.1-linux.zip – vitaly Jul 11 '14 at 02:10
  • 2
    I'd recommend the following links to accomplish the task: [SDK Tools Release Notes](http://developer.android.com/tools/sdk/tools-notes.html) and [SDK Platforms Release Notes](http://developer.android.com/tools/revisions/platforms.html) – Alan CN Sep 17 '15 at 12:30
  • This is useful, but only works for versions up to and including 25.2.5. – markshep Jun 16 '17 at 15:25
  • 5
    The URLs for versions newer than 25.2.5 changed format. They now no longer reference the SDK version, but some kind of build number or version control revision or something instead. For example the URL for the tools for SDK 25.3.1 for macOS is https://dl.google.com/android/repository/sdk-tools-darwin-3773319.zip and for SDK 26.0.1 is https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip – markshep Jun 20 '17 at 12:39
  • As @markshep said it seems the links for the most recent revisions (after 25.2.5) changed or are inexistent for GNU/Linux versions. I could download only revision 25.2.5. The oldest ones I didn't try. – Caco Apr 13 '20 at 13:21
  • For mac the links still work, even for v29+, but you need to put `-darwin.zip` at the end instead of macosx – qwertzguy Apr 15 '20 at 00:28
7

Some of you probably found this thread due to the unstable versions of Android-Tools pushed (exclusively) since the stable 22.3 version. This causes a 'hang' in the emulator on the "Android Animation / Splash Screen" in Intel API's pre Version 19, and a "floating point exception" for Intel API-19. The ARM versions still work, though more slowly on Intel machines using acceleration.

To answer the questions of "how to find the older versions not listed in the GUI" - or present in the current xml which feeds it (https://dl-ssl.google.com/android/repository/repository-8.xml), in the comments above, I have no idea how they can be located (please enlighten me).

Fortunately, someone reporting the bug did post a direct link to the Linux and Windows versions of the stable 22.3 version in this thread:

https://code.google.com/p/android/issues/detail?id=66786 ... which are:

http://dl.google.com/android/android-sdk_r22.3-linux.tgz

http://dl.google.com/android/android-sdk_r22.3-windows.zip

These also exist in unofficial locations on the web, should those get pulled down, along with the now-gone references to them.

After extracting that archive, you will have the "Tools" folder you need to replace the broken one, as per Ariel Iriarte's instructions above (though I renamed the existing 'Tools' folder something involving the letter 'f' - days into this problem).

In order to prevent this problem from re-occuring, do NOT count on the built-in method in Eclipse / Android-SDK to revert to a previous installation, nor for the older-versions of any file provided by Google to be available At All, Ever, in the future. Backup your entire 'android-sdks' tree prior to installing anything.

JosephK
  • 640
  • 10
  • 18
2

You can install multiple SDKs, and set the default SDK by editing the properties on the Android project.

Waynn Lue
  • 11,048
  • 7
  • 49
  • 71
0

The simple solution is :

1- Go to your graddle-wrapper.properties then change this line as you desire :

distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip

2- Go to File>Project Structure>Project then Change both Gradle version and Gradle Plugin Version

3- then Sync your Project

Done.

Ali Esfandiari
  • 188
  • 2
  • 12