Android SDK installation failed - Connection reset. Nothing is installed - android

Hello I have a problem with installing the packages using the Android SDK Manager.
I get Connection reset. Nothing is installed.
I am on Windows 7 64 bits using JDK 7.
Here is what I tried so far without success:
Installed Android SDK installer_r18-windows.exe
Then run Android SDK Manager as Administrator and I can select which packages I want to install.
So far so good.
Then when I select the packages I want and click Install then the log says:
Downloading SDK Platform Android 2.3.3, API 10, revision 2
peer not authenticated
I googled this error and they say that you need to set Force https://... sources to be fetched using http://....
If I do that and click install I get this error:
Downloading SDK Platform Android 2.3.3, API 10, revision 2
Connection reset
At every package it tries to install.
I tried setting the proxy setting according to my internet providers setting. I get the errors again.
I tried deactivating the firewall. Same errors.
So how do I get the Andoid SDK Manager to install the packages succesfully?.
Thank you for your help.

Others have also faced similar problems when downloadind SDK components.
A simple way to fix this problem is to modify the Pkg.SourceUrl property, changing HTTPS to HTTP to avoid secure downloads, as illustrated in the answer to this question.

I ran into the same problem today. In my case, the download would start and then abort with the same error message.
If the download starts and then aborts, try downloading again - SDK Manager will resume the download where it aborted. It doesn't advertise that feature (let alone resume by itself), but the log entries report that it is in fact resuming the download.
You might need to retry a few times - depending on how stable your Internet connection is and how much you download. Not too elegant, but will do for a quick on-the-fly install.

This may be cause of system time may have changed. Synchronize your system time with one of the internet time servers. Restart the installation. Hope it works.

Related

Xamarin - Cant start SDK or AVD

So I have just installed the community version of Visual Studio 2017 and added Xamarin to it. When the installation was over, a error log was created saying in it that the SDK and Emulator components were not downloaded properly. So I redownloaded and same thing. I then tried modifying and repairing, again nothing helped - still the same problem.
Now when I start VS without minding the errors, I am not able to access the SDK and AVD. I click on the icons and nothing happens. I checked the path to the SDK (looks alright to me, but I guess as the error log said - SDK might not be properly installed).
I am in a corporate environment and am not allowed to download just the SDK from the android website.
I am basically trying to reach out to you all for help. All tips and answers are appreciated.
Cheers!
Error Log:
The product failed to install the listed workloads and components due to one or more package failures.
Incomplete workloads
Mobile development with .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.0.26403.0)
Incomplete components
Android NDK (R13B) (Component.Android.NDK.R13B,version=13.1.6)
Android SDK setup (API level 23) (Component.Android.SDK23,version=15.0.26208.0)
Google Android Emulator (API Level 23) (Component.Google.Android.Emulator.API23.V2,version=15.0.26208.0)
Intel Hardware Accelerated Execution Manager (HAXM) (Component.HAXM,version=15.0.26208.0)
You can search for solutions using the information below, modify your selections for the above workloads and components and retry the installation, or remove the product from your machine.
Following is a collection of individual package failures that led to the incomplete workloads and components above. To search for existing reports of these specific problems, please copy and paste the URL from each package failure into a web browser. If the issue has already been reported, you can find solutions or workarounds there. If the issue has not been reported, you can create a new issue where other people will be able to find solutions or workarounds.
Package 'AndroidSDKV2,version=24.4.1.9' failed to download from 'https://go.microsoft.com/fwlink/?linkid=824150'.
Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=AndroidSDKV2;PackageAction=DownloadPackage;ReturnCode=0x80131509
Impacted workloads
Mobile development with .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.0.26403.0)
Impacted components
Android SDK setup (API level 23) (Component.Android.SDK23,version=15.0.26208.0)
Google Android Emulator (API Level 23) (Component.Google.Android.Emulator.API23.V2,version=15.0.26208.0)
Intel Hardware Accelerated Execution Manager (HAXM) (Component.HAXM,version=15.0.26208.0)
Details
WebClient download failed: The remote server returned an error: (407) Proxy Authentication Required.
Bits download failed: Error context: BG_ERROR_CONTEXT_REMOTE_FILE, Error code: -2145844841
WinInet download failed: Url 'http://dl.google.com/android/installer_r24.4.1-windows.exe' returned HTTP status code: 403
Package 'AndroidNDK_R13B,version=13.1.5,chip=x64' failed to download from 'https://go.microsoft.com/fwlink/?linkid=833504'.
Search URL: https://aka.ms/VSSetupErrorReports?q=PackageId=AndroidNDK_R13B;PackageAction=DownloadPackage;ReturnCode=0x80131509
Impacted workloads
Mobile development with .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.0.26403.0)
Impacted components
Android NDK (R13B) (Component.Android.NDK.R13B,version=13.1.6)
Details
WebClient download failed: The remote server returned an error: (407) Proxy Authentication Required.
Bits download failed: Error context: BG_ERROR_CONTEXT_REMOTE_FILE, Error code: -2145844841
WinInet download failed: Url 'http://dl.google.com/android/repository/android-ndk-r13b-windows-x86_64.zip' returned HTTP status code: 403
IF you are using windows 10, check if Hyper-V and Hyper-V Tools are installed.
Open the RUN Command on your start menu, or using Windows + R - Type "appwiz.cpl" - click on "Turn Windows features on or off" and check if Hyper-V are selected and installed.
If not, select-it and restart your machine, and this mus solve your xamarin issue.
If, this dont solve, this could be a firewall issue, and this maybe blocking the download of xamarin tools.

All packages are not available for download error in android

All packages are not available for download!
The following packages are not available:
- Package id sources;android-24
Am trying getting data from database by using of web services, when am running the application getting an above shown error.
How can I resolve this issue in the android studio?
Open SDK Manager -> SDK Platform
Check on Show Package Details and Sources for Android ... then download
The popup error is not related to the exception you got on your application. Api 24 source code is not fully available. Hence you got the error. Change complieSdkVersion and targetSdkVersion to 23 and sync the gradle.
I just closed my IDE then restarted my computer. When I opened the IDE the error was no more.
Make sure you have good internet connection, as the error might be caused by a lack of internet connection preventing the IDE from reaching the site.
Check if the SDK version is installed on Android studio for that particular Android device. e.g. If Android Device has version 4.3 then check if SDK for this version 4.3 is installed, you can check it through Android Studio SDK manager. If not installed then install it complete.
Restart Android studio, reconnect the device, That's it
A thing I ran into, check to see if you have more than one android sdk on your box. I'm not sure if it was confusing Android studio or not, but I had one previously installed under Program Files. I ended up going into the AppData\Local\Android version used by Android studio and adding stuff I needed manually running the SDK manager as administrator.
This means that you can't reach the download site, and it has many reasons one of them is that you are in a country in wich the American laws won't allow to use such technology so you have to use a proxy program and to configure the sitting in your Android studio to use the proxy gate and port.

Android Studio - IceCreamSandwich remains "Partially installed"

I'm trying to develop an app targeting the API 15. However every time I try to install the SDK platform in Android Studio, it stop before the end,showing connection timed out, and leave me with a partially installed SDK platform...
Trying it several times with the rights and a good internet connection gave the same result every time. I can still compile and (sometimes...) run my app using it but some bugs are there as well and since I'm pretty sure it's linked, I would lik to get the platform properly.
Thanks!
Using Android Studio version 2.3.3, to check which components of the SDK package for the platform were not installed properly:
Start the Android Studio "SDK Manager"
Under the "SDK Platforms" tab, select the check-box at the bottom that says "Show Package Details"
The SDK package will be expanded and show you the status ("Installed", "Not Installed", "Partially Installed") for each component of the package
This will enable you to install the components individually, and if they fail to install, debug what the issue is.
If you are in a country like China where Google is blocked or where you might have any problem with https, this fix the problem:
Check "Force https://... " (to force SDK Manager to use http instead of https)
For the rest the problem can come from the server as well.

Run Google Play Services 5.0.89 on emulator

I'm trying to run an application using the latest Google Play Services (5.0.89 at the moment) on the android emulator, but every time I open it, I get the notification asking me to update G.P.S. I'm using a "Google API L18" AVD. And this is quite annoying if you're trying to run some espresso tests.
Apparently, it's a common problem that keeps plaguing android developers: https://code.google.com/p/android/issues/detail?id=57880
So far I've tried:
just clicking ok -> but then I'm not connected to the services, which is bad
switching to the Android L Preview AVD -> same problem
downloading the G.P.S. apk from somewhere and trying to install it. Fails, since it's already present (and cannot be uninstalled)
creating and AVD without G.P.S. and installing them manually. I get a "device not supported" error
installing just a few packages (like this "adb -e install com.google.android.gms.apk) -> but I cannot find them for the 5.0.89 version
in my application code, ignore the error returned by GooglePlayServicesUtil.isGooglePlayServicesAvailable -> the connection still fails (which means that simply not checking is not an option)
UPDATE Trying to edit the value of GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_VERSION_CODE through reflection -> didnt't work (btw, yes I know it's an horrible hack, at this point it was more curiosity than anything else)
So, did anyone find a solution for this?
So far, the only option I can come up with to make it work is to delete my local copy of G.P.S. from the SDK tools, replace it with a previous version downloaded from somewhere (I haven't looked for it yet, but I'm pretty sure I'll be able to find some shady site providing it) and then rebuild my app. But this isn't something I'd like to do.
If you go to the SDK Manager and check for updates, there should be an update for the API 19 system images. Have you tried updating to those and recreating the emulator and seeing if the problem persists?

Android SDK beginner question

I'm a n00b developer at my second attempt to use the Android SDK. I'm
developing on the Mac platform and I've noticed that the latest
version of the SDK doesn't include anything except the tools (so I
have no plugins, no targets to choose from inside the package I
downloaded).
So I tried to use the Android SDK and AVD Manager to download and
install some, however, I got this error:
Failed to fetch URL https://dl-ssl.google.com/android/repository/
I went to the settings and checked the box to force fetching via HTTP,
but no result. I was suggested to look for a configuration file, but
couldn't find any.
Any suggestions? I'm dying to get my hands dirty with the SDK.
Whenever I've seen that error, I've just retried the download several times and eventually it went through. I've only run into it when I was behind a proxy, but that might not be your problem.
Here you have a Android tutorial, step by step.
http://www.vogella.de/articles/Android/article.html
Its means that you are behind a proxy.Go tools->options in your android SDK manager and enter your http Proxy server and port and it'll work.

Categories

Resources