SDK manager doesn't reload - android

I recently installed the Android SDK on my Windows 8 PC (had it previously on Windows 7 too). Today, when checking for updates, I realised that it is not checking for updates at all. It only shows the packages I have already installed. I want to install some APIs but nothing shows up. Has anyone else got this problem? Is there a way to work around this and get it to update again?

I recently ran into the same problem. Close Eclipse and open the SDK manager from the SDK folder directly. From there try and update.
Using that method I was able to get some updates but not all. I actually had to copy the missing SDK level (17 for me) from a flash drive to trigger the rest of the updates to show up for me.
Edit
After a few days of having the troubles not completely go away I simply delated the entire SDK folder and downloaded it again from Google.
So far everything seems to be working fine.

It seems that you had permission issue..
try to run your sdk as administrator

Problems connecting to the SDK repository
If you are using the Android SDK Manager to download packages and are encountering connection problems, try connecting over http, rather than https. To switch the protocol used by the Android SDK Manager, follow these steps:
With the Android SDK Manager window open, select "Settings" in the left pane.
On the right, in the "Misc" section, check the checkbox labeled "Force https://... sources to be fetched using http://..."
Click Save & Apply.

The problem was Kaspersky blocking the Java exe's from running. Added exception and now it works.

Related

Android Studio select SDK error on trying to run project

I am using Android Studio 3.1 on Ubuntu 18.04 LTS. I'm currently working on a project with target API 28. I've downloaded the SDK with API level 28 during installation but sometimes when I try to run my project on my device, a popup dialogue prompts me to select the SDK. This does not happen every time but happens sometimes even if I've run the project before and made no change to the SDK path. I don't know what triggers this. I've seen similar questions on StackOverflow, but none of the solutions work for me. Here's what I have done so far:
Synced my project
Invalidated cache and restart
closed my project and opened it again
Uninstalled my SDK and downloaded it again
Switched back to an older version of SDK and then back again
But none of this works and the only workaround I found was to open another project that I downloaded from Github (with API 26), build it and then go back to my current project. This solves it temporarily. A few of my friends are working on the same project on different machines (Windows, Mac) and they have this problem, too.
Is this a bug with AS or is there a permanent solution?
File->Settings->Android SDk.
If already was there in your system set the path to that otherwise download the SDK from SDK tools by selecting specific name.
I've found this workaround. It is not perfect, but it works. Hope this this will be helpful for someone else.
Move your project folder to another location and then open it. It resolves the problem.

new AVD can't click on OK button, not system image [duplicate]

This problem sounds similar to a few others, except in my case the OK button is not grey-ed out. But for those who would rather not click the links...
Trying to create or edit an AVD from within Eclipse, after entering my settings, the "OK" button seems to be "clickable", but when I click it absolutely nothing happens.
I've made sure I have the appropriate system images installed, and that the target platform matches the API being used. Clearly a CPU has been chosen, skin set, etc... all the things that would make the OK button greyed out, which it's not.
I can create/edit AVDs if I run the AVD manager from outside eclipse, so this isn't the end of the world, but I feel there's a solution to this particular problem and I want to help solve it.
I've tried running eclipse as an administrator (that's what stopped the AVD manager from crashing outside of eclipse). I've tried just waiting around, or clicking multiple times. Looking at the Task Manager, no new processes begin when I click OK, nor does eclipse's CPU or RAM usage increase at all. The "Edit Android Virtual Device" window doesn't even go away.
Any clues?
(Running Indigo with the ADT plugin, btw, not the bundled version, which failed to work in a different way. Java 1.6.0 45. Windows 8, unfortunately. Plenty of RAM etc)
THIS IS A POSSIBLE WORKAROUND FOR BUGS IN ADT 22.6.0 ONLY, THESE BUGS SUBSEQUENTLY FIXED IN FOLLOWING BUILDS
Download and install new ADT v22.6.1 from here (zip) or use SDK manager to update
Seems like some bug from Google side, this problem found after "ADT 22.6" update. Widely reported on "Android Open Source Project - Issue Tracker" and nobody properly answered it yet.
However I was partially successful to create an AVD by opening "AVD manager.exe" from "Android SDK" for creating new AVD try to open directly AVD Manager.exe in SDK folder.
May be we have to wait for any conformation from Android community
Worked for me, sort of.. .
(Windows 8.1 Pro 64 Bit, Java JDK 1.7 Update 25, Eclipse Standard Kepler Service Release 1, Android Development Toolkit 22.6.0.v201403010043-1049357)
Update 1
Further research revealed that launching AVD Manager from SDK Manager (Tools --> Manage AVDs...) also works without any problems.
Update 2
More bad news is AVD creation not working from command line tool too.
Update 3
Assuming some parameter passed during launching AVD manager from Eclipse causes these problems
Update 4
Updated Java to JDK 1.7 Update 51 and Eclipse Standard SDK to Kepler Service Release 2 their latest and no resolution to the problems. Also tested under Debian and same results obtained.
Update 5
At https://code.google.com/p/android/issues/detail?id=66661 android project members conforms the problems and promises to fix by upcoming versions of ADT (22.6.1 - 22.6.3). At the mean time I would suggest to roll-back ADT to a lower version version 22.3.0
To uninstall current ADT go to
Help --> About Eclipse --> Installation Details --> Android Development Tools --> Uninstall
I may suggest uninstalling whole packages from Android (DDMS, Hierarchy Viewer, NDT, Traceview, OpenGL ES..etc..) to avoid any possible compatibility issues and install a fresh new ADT from above link through archive installation method.
Hope this will solve this problem temporarily. And wait for new release of ADT here.
Update 6
New ADT, version 22.6.1 is out now which will solve these problems
To elaborate on the statement "I can create/edit AVDs if I run the AVD manager from outside eclipse" in the OP:
Run the following on the command line
<android-sdk-location>/tools/android avd (on Linux in this case)
This launches the same AVD window you see when you click the AVD Manager icon in the eclipse toolbar. But this instance of the AVD manager does not have the bug, and you can create and run emulators as you did before the bug was introduced.
1 minute solution
I used a quick workaround where I cloned a device that already existed. The Clone button worked and I was able to successfully edit the clone.
Steps:
Select a Device by Google
Click the "Clone..." button
A window will pop up, click "Clone device"
Select the newly cloned Device, it should say "... by User"
Click the "Edit" button on the side
There you have it, you now have your own custom virtual device
Update and Solution: AsYashwanth Krishnan said, The bug in question is now fixed in later versions. I tried ADT 222.6.1 and ADT 22.6.2 , and they did not suffer from the bug of not not being able to create or edit Android Virtual Devices. The direct solution is to update you ADT to latest version, The workaround written below is left only for historical purposes.
Historical Workaround As #Yashwanth Krishnan said, this is a bug in ADT plugin 22.6; so best workaround is to rollback. for those asking how to rollback, here is a step-by-step guide:
First: Uninstall ADT plugin and all related plugins for android:
help->about
Installation details
Select android plugins and press uninstall button
Restart
Second: Download ADT 22.3.0 Archive from https://dl.google.com/android/ADT-22.3.0.zip
and install it
add repository from archive on local disk
Select android plugins
INFO:
I WAS able to create an AVD successfully after clicking OK several times and modifying some of my settings as a test.
I tried yashwanth krishnan solution and tried to open the AVD Manageer.exe directly without success. The manager will not open directly for me on Windows 8 x64. It tries to open, then shuts down immediately...
I met this issue too . The issue occurs in the latest version 22.6 which was released in March . Meanwhile I did the testing in 22.3 , the issue was not found .
So that I suggest that rollback the ADT to 22.3 and wait the new fix for 22.6
I banged my head on this for several hours until I found out that the default location was C:\username path\SDKs or something, where Android was installed on my system to D:\sdks\android_sdk_windows. So, changing the Eclipse Android directory to D:\sdks\android_sdk_windows fixed it.
I also heard that it may help things if you install the Android SDK to a path without spaces.
Hope this helps someone keep some hair.
Today I ran into the same problem after installing Maven. I messed around with different Path settings to get it to work and I ran into issues. I was also trying to install the google server for GCM. Somewhere in what I was doing I corrupted the Android Virtual Device Manager. I searched S.O. for an answer, then I decided to follow the first rule of TechSupport. I reinstalled the tool kit!
I went into the SDK manager and I uninstalled the tools (by clicking the Tool checkbox). It took several minutes to delete them all. Then I reinstalled the Tools which took about ten minutes. I rebooted Eclipse and the AVD and worked just like it did yesterday!
This time it only took a total of twenty minutes to fix.
Per the release notes, this problem has been resolved in revision 22.6.1, which is now available for download.
Updated your Android SDK Tools to 22.6.1 in Eclipse by selecting Window > Android SDK Manager and follow the prompts to install the update.
After that update finishes, select Help > Check for Updates and follow the prompts to update the appropriate Eclipse components.
After completing these updates, I tested the AVD functionality and it appears to be working properly.
i just copied the avds from a different system as descriped here:
Android - How to copy the emulator to a friend for testing
I faced the similar issue. I am using 23.0.2 version of android SDK.
"OK" button was disabled, but then I went to the path where android SDK was installed. In my case:
C:\Program Files\Android\android-sdk\
and executed AVD-Manager.exe by right clicking and selecting Run as an Administrator, and it worked like a charm.
Sometimes the AVD cannot be created because of this following error while starting:
x86 emulation currently requires hardware acceleration!
I was also facing this same issue. If u are facing the same, then it can be resolved by opening SDK Manager -> Under Extra -> Installed "Intel x86 Emulator Accelerator (HAXM Installer). Then when creating the AVD, select the proper CPU. This should work. :-)
For those posting that we need to set the sdcard size: I tried that and many other settings, and none of that helps. I get the NoClassDefFound Exception mentioned by mogilka, in the Error view. No configuration settings are going to fix that. It seems a bad update was pushed
Give some value for your sd card. May be something like 100 or 200

Windows - Android SDK manager not listing any platforms or packages to install

After I have installed the Android SDK using the exe file available and the Android SDK manager has opened, I cannot see any of the additional packages that are needed to be installed. All that is listed is the Android SDK Tools under the Tools folder. The Extras folder also doesnt display anything under it. So without this, I am stuck right in the beginning. The log messages that I get also doesnt exactly point me to anywhere. Following are the log messages that I get:
Fetching http://dl-ssl.google.com/android/repository/addons_list-2.xml
Fetched Add-ons List successfully
Fetching URL: http://dl-ssl.google.com/android/repository/repository-7.xml
Done loading packages.
Any help will be appreciated!
If your problem hasn't already been solved, try setting the proxy server from the SDK manager under the Tools -> Options menu. This is the mistake I had made. Perhaps this might help you too.
I had a similar problem because I was running SDK Manager from eclipse. The menu does not even have a Tools -> Options option. If this is the case just run the installed SDK Manager from your programs
Try disabling your firewall, it works for me

Slow SDK download through Android SDK manager

When I run Android SDK manager to download SDK platform, the download speed is 8 KiB/s. It would take more than 2 hours to download one platform like Android 2.2, API 8. There is no problem with download stuff through browser. Does anyone know how to fix this problem?
I have not experienced this issue. Force or unforce HTTPS (there is an option for this under Settings), and see if this improves the quality of your connection.
I also have this problems and found a solution online and it looks like it working for now. I tried with forcing HTTP AND HTTPS and nothing really work.
So try this:
1.) Run command prompt as an administator - Windows 7 (Start->Right click on Command Prompt-> Choose "Run as Administrator") or "Start" enter CMD into search box and then right click and "Run as administrator".
2.) In Command Prompt window enter:
netsh
and press ENTER
3.) Then write this and hit ENTER at the end:
interface tcp set global autotuning=disabled
4.) Now restart your SDK manager and try to download again!
Before doing the above, Take note of your original value in case you want to revert back:
interface tcp show global
Try disabling antivirus and enabling Force https://... sources to be fetched using http://... in Android SDK Manager's Tools-> Options....
This helped me.
Unchecking the https box worked for me.
Check those XML file links
Let me pen them down here...
Google Repository for SDK's Of all Android API
Google Repository for Add-on's (Google API's) for all Android API
Intel API's for Android
Google repository for system Images
MIPS repository for system images
Intel repository for system images
Now you will know what you must be looking out for....
Take an example of this snapshot
Say i want to download google API for Android API12
then Google Repository for Add-on's (Google API's) for all Android API
Lookup for <sdk:url> tag under <sdk:addon> tag as given in the example below
and then use the link used to obtain the XML file
Strip off the last part and replace it with the <sdk:url> tag content
for eg: in this case it would be like
Google API for Android API 12 (HoneyComb)
there you have a download link....
Similarly SDK's ,System-images can be downloaded....
Dont have to wait for ages to complete that list ;) for you download to get accelerated use DAP or IDM ( download accelerators )
Enjoy! :)
You can manually download and install Android SDK Component.
Method:
STEP 1- Go to android SDK installation folder("C:\Users\%username%\Appdata\Local\Android\android-SDK" or any other location you choose during installation) then open android SDK manager
STEP 2- Check the Component you want to download
STEP 3- Then click on install 1 package
STEP 4- Click on stop button
STEP 5- Navigate to android SDK installation folder then go to temp ("C:\Users\%username%\AppData\Local\Android\android-sdk\temp") folder here you will see two files are created copy the name of the set up information file
STEP 6- goto web browser and type url https://dl.google.com/android/repository/(file name you copied)
in my case https://dl.google.com/android/repository/android-23_r01.zip
STEP 7 - A file will be downloaded automatically
STEP 8- After download is finished go to "C:\Users\%username%\Appdata\Local\Android\android-sdk\temp" and delete the two files created there and paste the downloaded file there
STEP 9- Now go to android SDK manager and check the component again and click on install 1 package
STEP 10- The package will be installed automatically
After working on this for weeks and trying all the above plus other suggestions around the web, I came up with the following solution:
1) Remove PC Tools Firewall Plus
2) Remove AVG free antivirus
3) Install Comodo Internet Security Free.
The files are downloading and installing fine now. I'm also using HTTP mode as suggested. If you have any of the above security tools I recommend giving this a try. BTW, turning off PC Tools will not be enough.
None of the other solutions listed here resolved the issue for me, not even uninstalling Android Studio/SDK and then reinstalling them. It's worth noting that the standalone SDK Manager has also been deprecated since a lot of these answers were posted.
After hours of troubleshooting, I managed to resolve the issue by renaming my Android Studio config folder (~/.AndroidStudio2.3) to something else and making Android Studio create it again. You can ask Android Studio to import your old config and it still works, so it's likely something to do with the system folder.
Hope this helps anyone else that is having this issue but was unable to find a solution like myself.
I had the same problem plus google don't allow me to access andriod, and I must connect with a VPN. so I download all xmls and package that I need to my localhost and set dl-ssl.google.com too 127.0.0.1 and then I install them from my local with extra speed :D
I also have this problems and found a solution online and it looks like it working for now. I tried with forcing HTTP AND HTTPS and nothing really work.
So try this:
1.) Run command prompt as an administator - Windows 7 (Start->Right click on Command Prompt-> Choose "Run as Administrator") or "Start" enter CMD into search box and then right click and "Run as administrator".
2.) In Command Prompt window enter (everything without quotes): 'netsh' and press ENTER
3.) Then write this and hit ENTER at the end: interface tcp set global autotuning=disabled
4.) Now restart your SDK manager and try to download again!

Not able to add android platform using AVD manager - not able to fetch the url from AVD

I wanted to start working on android but having installation issues. When I start the AVD Manager and check the repository.xml url it gives me an error "... not able to fetch the url. Connection timeout." the same thing happens if I use http or https but if i try to open the url in my browser, it returns the response. I do not have a manual proxy set in the browser but do have an automatic proxy configuration url. I tried copying that url to the internet section in AVD but still no response returned. Also, we do not have the permission to turn off the firewall.
Is there a place where i can download the SDK Platform Android (1.6 preferred)?
if you look in the folder where you have the sdk installed, you will see both the avd manager and the sdk manager. click on the sdk manager and you will be able to install additional platforms from there. Still not showing up in my AVD manager, but Android 4.0 is downloading so i no longer care :)
Consult this
HTH
I've been working on the android developer "quick start" for about a week. This problem has not been solved or at least not explained anywhere. It's been happening for a couple of years now. 2008 is the first record of a problem. All suggestions have failed. "change 'https' to 'http'" etc.
cM
I came across this with a similar answer.
I used the installer, and it didn't install the AVD manager. Going back to the developer files I grabbed the 'rar' and ran the 'adk manager' to get the files I needed. This installed the files to set the target when creating the AVD.
Worked for me.

Categories

Resources