Android Studio Update Fails - android

Just got the new Android Studio but it won't connect for updates. When I go to Help>Check for Updates... I get a pop-up sayin:
Connection failed. Please check your network connection and try again.
I tried changing my network settings around (Static/DHCP).
I tried "Auto-Detect Proxy settings".
I tried Adding "studio.exe" to my inbound/outbound rules of windows
firewall, I also have "Java(TM) Platform SE binary" added (The VM
running Idea).
I tried looking around my hosts file to see if I messed something up
in there.
I run normal IDEA and my updates connect, but obviously tells me there is no new updates.
Has anyone else run into this problem or found a solution to this? My colleagues at work here did not have this problem at all, only the "JAVA_HOME" issue on one of my colleagues' machines.

The following steps may help to fix this issue:
Open configuration
Select Settings
Select HTTP Proxy
Change no proxy to auto-direct proxy settings
Click check connection . check with any Site
done

Looks like it is a bug in Android Studio. Others are having the same problem, check out here and here. It's worth remembering that v0.1 is an Early Access Preview as described on the official Android web site.

I have checked the base IDE's FAQs and found an answer that helped me out: edit the file ending with .vmoption in Program Files (x86)\Android\android-studio\bin and add the following option:
-Djava.net.preferIPv4Stack=true
or if you prefer IPv6:
-Djava.net.preferIPv6Addresses=true
It works for me.
Source: http://intellij-support.jetbrains.com/entries/23403071-Network-connectivity-issues-when-running-under-Java-1-7

None of these answers helped me nor did trying to manually add the downloads certs to my java and jdk keystores. If you are in the same spot as me, try editing your vmoptions files to include the paths.
On Windows you need to open an editor with admin privs and you can find the files here:
Program Files (x86)\Android\android-studio\bin
Add these two lines to whichever version of AS you use or both to be sure.
-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml
-Didea.patches.url=http://dl.google.com/android/studio/patches/
I discovered this via a note from a Google dev: https://code.google.com/p/android/issues/detail?id=74610&q=android%20studio%20connection%20failed&sort=-stars&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

I am not sure if our problems are identical, but when I had trouble updating Android Studio I ran it as administrator and then tried to update and it worked. I solved a similar problem on Eclipse in the same manner.

I updated my Android Studio to 1.5.1 and met the same problem.
I'm using ShadowSocks and I guess it caused this issue. I changed HTTP Proxy setting from no proxy to auto detect and it was solved. You can click "Check connection" and enter any URL to test whether auto proxy detection works.

I can update it using the astrill VPN. its website.

Step 1 is vague. Please indicate where this "Open Configuration" step occurs. Is this the Internet Properties for the computer, or some dialog buried deep within the bowels of Android Studio? I have searched and cannot find anything called "Configuration" or "Open Configuration" within Android Studio. Possible candidates might be (from the available / non-grayed out menu items):
File -> Settings
File -> Other Settings -> Default Settings...
File -> Other Settings -> Configure plugins...
Run -> Edit Configurations...
Help -> Configure Debug Log Settings
However none of these choices offer up anything that allows you to follow the indicated next steps.
I am on Windows 7, running Android Studio (Preview) 0.5.2 and the only reason I'm trying to use AS is because of the stupid logcat scroll problem in Eclipse (another crappy editor).
If someone could recommend a solution to the AS update / connection issue (yes, I checked, the other solutions on here don't work either), Eclipse non-locking scroll lock (yes, I checked, the solutions on here don't work), or an actual functioning Android plugin for NetBeans, I'd be extremely grateful. Thanks!

Related

Visual studio can't debug Android Xamarin app

I've started with Xamarin and Android using Visual Studio 2013.
When I start debugging the android app, it builds, deploys to device and then debugging in Visual Studio stops. I can't hit any breakpoint. App is working in device, but I cannot debug it.
Am I missing something?
I've tried various emulators and a physical android device but debugging doesn't work in any of them. It just act like I have stopped it.
Debugging the same solution in Xamarin Studio works, I just can't get it working in Visual Studio.
I was having the same problem and I found this workaround with Hyper-V in Xamarin's documentation: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/debug-on-emulator/visual-studio-android-emulator/
TL;DR; Open Hyper-V Manager -> Go to settings on your emulator -> Go to processor settings -> Select Compatibility -> Mark the "Migrate to a physical computer with a different processor version" checkbox -> Done! (At least for me) VS is now debugging my Android App
Another reason why Visual studio can't debug Android Xamarin app with a Hyper-V is due to you don´t have 'Deploy" option check in android project.
Steps: 1) Enter in "Solution properties" 2) Select "Configurarion Properties" 3) Check "Deploy" in Android project.
Make sure you are running on Debug mode (on target).
Then, check the Properties of the App Project and see if it's using the Xamarin debugger instead of the VisualStudio Debugger.
Enter in "Solution properties"
Select "Configurarion Properties"
Check "Deploy" in Android project.
Open Hyper-V Manager
Go to settings on your emulator
Go to processor settings
Select Compatibility
Mark the "Migrate to a physical computer with a different processor version" checkbox
This will also happen if you don't have any activity marked as your main launcher activity:
[Activity(
...
MainLauncher = true,
...)]
public class MainActivity ...
Easy mistake to make if you're shifting code in from a prior project and the prior project is using a splash activity and your new project is not yet doing so.
Go to property of app project then click android option and checked checkbox in debugging section.then run again.
For anyone who might still need help. Also make sure the build and deploy checkbox's are checked in the configuration manager. .
In my case, after some investigation, I saw I was having this warning: "Failed to read .android.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. 2>Mono.Cecil.Cil.SymbolsNotMatchingException: symbols were found but are not mathing the assembly"
The solution was to disable linking:
Right-click the Android Project -> Properties -> Android Options -> Under "Linker properties", set Linking to None (see image below)
Got this from TedFalasco's answer on this post.
Hyper-V manager can't be installed on Windows 7 (only the management tool gets installed) so if you get this problem, following those steps don't help.
Here is the thing that worked for me and it's mentioned here as an answer but hasn't been marked up or marked as an answer. This is actually the best and easiest solution. nothing else worked for me.
In Visual studio, make sure you choose the solution file (not project files) in the solution explorer. Then go "Project > [project]properties"
in the left pane choose "Configuration Properties > Configuration"
Now check the Deploy feature if possible. Only deployable projects have the option.
This saved my life and I almost gave up on Xamarin. I really hope this helps others like me.....
In my case, the warning was self-explanatory:
Set the debugging information to Portable in the Visual Studio project property pages or edit the project file in a text editor and set the 'DebugType' MSBuild property to 'portable' to use the newer
In other words: Right click on project => properties => build => click on advanced => set the debugging information to portable.
I have tried every answer and none of them worked.
Here is what I did to make it work again:
Plug your physical android device to the computer. Android device must have Developer options enabled.
Choose your android device in Visual Studio.
Run app in Debug mode. Your app should appear on your android device.
Unplug your android device from computer.
Try running your app in android emulator. For me Debug option starts working again.

Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to https://dl-ssl.google.com refused [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Using Android SDK Manager when I try to update it just gives the following messages about not being able to connect. I've tried disabled firewall and anti malware. I also tried to run as admin and move to c:\android. I'm running windows 7 64bit. I've also tried forcing etc.
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to refused
Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to refused
Follow the following steps if you are using proxy server:
Open Eclipse
Window >> Android SDK Manager >> Option
Input your proxy server and port.
Hope this helps.
Go to Internet Explorer, into options -> connections -> Lan settings. There should be an automatic config script option, copy the url, paste it into a browser, this downloads the config file, opened the file up in notepad and there will be a proxy address and a port number in there like 192.234.10.23:88 paste the address into the proxy field and the port (88) into the port field in the Android SDK manager Tools -> Options dialog.
GoTo Tools -> Options in SDK Manager. Check https to force to http and try... Worked for me
I got the solution for the Android Studio installation after trying everything that I could find on the Internet. If you're using Android Studio and getting this error:
Find [Path_to_Android_SDK]\sdk\tools\android.bat.
In my case, it was in C:\Users\Nathan\AppData\Local\Android\android-studio\sdk\tools\android.bat.
Right-click it, hit Edit, and scroll all the way down to the bottom.
Find where it says: call %java_exe% %REMOTE_DEBUG% ...
Replace that with call %java_exe% -Djava.net.preferIPv4Stack=true %REMOTE_DEBUG% ...
Restart Android Studio/SDK and everything works. This fixed many issues for me, including being unable to fetch XML files or create new projects.
Run SDK Manager as Admin will solve your problem
After 7 long hours of searching I finally found the way!!
None of the above solutions worked, only one of them pointed towards the issue!
If you are on Win7, then your Firewall blocks the SDK Manager from retrieving the addon list.
You will have to add "android.bat" and "java.exe" to the trusted files and bingo! everything will start working!!
Do the following.
Close the sdk manager and eclipse.
Go to the folder where you have stored your adt.
In that adt folder you'll find a folder known as tools.
Make a copy of the contents of that folder and paste it in a folder called copytools.
Now go to the command prompt and go to the location of the copytools.
Then execute the command android.bat the sdk manager will start.
Now update all the plugins you want. It'll update your original folder.
After the update delete the copy.
Enjoy. Hope this helps.
I was facing same problem below is the solution that worked for me
First Go to Android SDK Manager then
select Tools then,
select Options
then check the box "Force https://... sources to be fetched using http://..."
hope it will help you also.
As srijan said,
Check your actual proxy settings, if you are using a proxy script to access the web, it might be (by default) : proxy serveur: proxy / proxy port: 8080
You may have these informations in Inter Explorer, Options, Connexions settings ..
Worked for me
You may also need to add rules to your firewall/antivirus.
If you are on Windows 7, simply run Eclipse with Admin privilege will solve this issue.
Just tried this on my Windows 7 64bits OS.
Sometime you need to add proxy setting in your SDK Manager
GoTO->Windows->SDK Manager->Tool->Otions
There give SERVER: proxy and PORT:8080
I had this issue running within a corporate network. I added a DNS entry for google DNS at 8.8.8.8, then my own corporate DNS server below this. Worked great after that.
just run the android sdk manager , go to tools then obtions and a new window will apears
mark the three checkboxes at the bottom and close it
it worked for me
I had the same problem today and it costed me all day :-(
I tried all of the suggestions above, but none of them did the work.
At the end, I uninstalled Comodo Firewall, and everything worked fine.
Before uninstalling, I tried to add the all relevant files as trusted application in the comodo firewall, but it didn't work
I had this issue with MacOS. I had to uncheck "use download cache" under Android SDK Manager preferences. This worked. I also recreated the cache folder and set my user as the owner then check user download cache. This also worked.
Using freegate as agent in China.
Run Freegate,latest version.
Run SDK Manager, Tools -> Options, Proxy Server 127.0.0.1, Port 8580.
I hope it will help you.

Eclipse with android plugin - Blocked at "calculating requirements and dependencies"

I have a problem during the installation of Android in Eclipse (Indigo and Helios, i've tried many different versions). When i search the plugin with the adress http://dl-ssl.google.com/android/eclipse/ , or localy (with the archive), it doesn't work.
It found the developpment tools, but it block at "calculating requirements and dependencies".
What's the problem ?
If you are installing from a local site, uncheck "Contact all update sites during install to find required software".
I had the same issue with win 7 x64 and any version of Eclipse. It's because it cannot connect to the Internet, sometimes it's just because of your firewall blocking its Internet access. But most probably, if it isn't the case, you need to go to your Eclipse preferences, General -> Network Connections -> choose Direct from drop down menu => everything should be unchecked now. It was the only thing that helped me on Win 7 x64. I don't have such issues on Win XP.
I had exactly the same problem, eclipse was stuck at "calculating requirements and dependencies " for ages.I searched the web and found a lot of solutions but none worked for me. So i booted in safe mode with networking (press F8) then started eclipse. It installed in 2 minutes. My AVG antivirus was blocking eclipse from accessing the internet. Hope it works for you too
Its causes because of these two reasons...
Your antivirus is not authoring eclipse to download the require data.
Or your firewall not allowing you to access downloading server.
Solution:
Simply open your antivirus panel "stop its working till the data is not installed".
And if 1st one do not works then open firewall setting and make it off till the data is not installed...
I had same problem, and I solve it.
Let's check below list.
Eclipse have blocked by your Anti-virus program or Fire wall
If you have checked, then UNCHECK 'contact all update sites ...' item.
Please click image button & refer it. (Marked with red line).
enter image description here
I had this happen when attempting to install an update after one of the update sites I had added to my Eclipse install went dead (the plugin provider changed the URLs for accessing their update site).
If it's due to a dead update site, it can often be solved by unchecking "contact all update sites during the install to find required software".
If you know which update site is causing the issue, and want to delete/disable it, or if you need access to other update sites during the install, you can temporarily disable or permanently remove update sites from Preferences->Install/Update->Available Software Sites.
I had the same problem on my Ubuntu. I guess you can solve your problem in the following way:
Load Eclipse. Click on Help > Install new software > Add and then for v3.7.x in the name box enter Indigo and in the URL box enter http://download.eclipse.org/releases/indigo then just follow the instructions to install the ADT plug-in and it will work.
If you are using other versions of Eclipse you need to change the name and url to the following -
v3.7.x Indigo - http://download.eclipse.org/releases/indigo
v3.6.x Helios - http://download.eclipse.org/releases/helios
I had a similar problem while attempting to install an Eclipse Plugin - ShellEd. It got stuck at the same point. As it points out the network problem, I simply disabled my WiFi connection while installing from a downloaded archive and the installation gets through.
Or just quit / relaunch eclipse, attempt to update it, fiddle with it until it will eventually install ADT

Eclipse, Android Plug-in, Install New Software just says "pending"

I'm trying to install the Android plug-in for Eclipse (32 bit Windows 7 - the Eclipse-Java-Indigo release), following the instructions here.
Mike Plate
The trouble is eclipse just says "Pending", in the Install New Updates window, with nothing else seemingly going on, after I put in the URL:
Google Android Eclipse
This is often a problem with proxy settings. If you're behind a firewall (or using settings which were configured under one) go to Window -> Preferences -> General -> Network Connections and configure it properly.
Close Firewall and virus program and try again. it worked for me.
I just disabled the Anti virus and it worked for me.

Android SDK Manager gives "Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml" error when selecting repository

I'm trying to install a platform but when I open Android Manager then I click Available Software then select the
https://dl-ssl.google.com/android/repository/repository.xml repository
I get this error:
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml
I have also tried downloading by clicking on force "http:" for all "https:" downloads on settings panel but it still doesn't help.
I'm working on Windows Vista.
Try this solution and it worked. this problem is caused because ADB is unable to connect to the android servers to fetch updates. (If at home try turning off firewall)
Goto Android SDK Manager
c://android-sdk-windows/ open
SDK-Manager
Click Settings - Will be
asked for a proxy.
If have one enter
the IP address and the port number.
If not turn off your firewall.
Check
"Force https://... " (to force SDK Manager to use http, not https)
This should work immediately.
If you enter the URL in a browser and then look at the source code of the page you will see that an XML document is returned.
The reason why that URL would work in a browser but not in the android manager might be that you are required to specify a proxy server. In Eclipse (3.5.2) the proxy settings can be found here: "Window" -> "Preferences" -> "General" -> "Network Connections"
All that was necessary for me, a Ubuntu user, was to change the owner of the ~/.android directory. In a terminal type the following command:
sudo chown -R username:username ~/.android
Obviously, you must replace "username" (twice) with your username.
I wasn't sure if I should post this as an answer because the original poster's question was concerning Windows Vista, not Ubuntu. However I found this post whilst searching for the answer on Ubuntu so I believe it is pertinent. I don't have sufficient reputation to comment on +Maher Gamal's answer, though, which is what lead me to this answer. Hopefully someone else finds it useful!
In Mac OS X, the solution is creating the file androidtool.cfg in our user .android folder and then add this line. Sure it is working also for Linux
sdkman.force.http=true
I hope that helps!
Open Android SDK Manager and open menu Tools->Options
in Proxy Setting Part
Set your proxy and ok
Investigating this error on my new Win 7 laptop, I found my ADT plugin to be missing. By adding this I solved the problem:
Downloading the ADT Plugin
Use the Update Manager feature of your Eclipse installation to install the latest revision of ADT on your development computer.
Assuming that you have a compatible version of the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to download the ADT plugin and install it in your Eclipse environment.
Start Eclipse, then select Help > Install New Software....
Click Add, in the top-right corner.
In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location:
https://dl-ssl.google.com/android/eclipse/
Click OK
Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons).
In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
In the next window, you'll see a list of the tools to be downloaded. Click Next.
Read and accept the license agreements, then click Finish.
Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
When the installation completes, restart Eclipse.
I am using Kaspersky. I just turned it off and the issue was solved!
I got the solution for the Android Studio installation after trying everything that I could find on the Internet. If you're using Android Studio and getting this error:
Find [Path_to_Android_SDK]\sdk\tools\android.bat.
In my case, it was in C:\Users\Nathan\AppData\Local\Android\android-studio\sdk\tools\android.bat.
Right-click it, hit Edit, and scroll all the way down to the bottom.
Find where it says: call %java_exe% %REMOTE_DEBUG% ...
Replace that with call %java_exe% -Djava.net.preferIPv4Stack=true %REMOTE_DEBUG% ...
Restart Android Studio/SDK and everything works. This fixed many issues for me, including being unable to fetch XML files or create new projects.
I had the same problem: the latest update failed to install because it couldn't
rename the tools folder in android-sdk-windows. I'm using AVG antivirus and
disabling it didn't help, but I don't think it had anything to do with the AV program
anyway.
Fact is, running the Android SDK setup apparently uses items in the
"android-sdk-windows\tools" directory. I'm on Win Vista x32 so maybe that causes some
unique situation - I'm not sure.
Solution:
I made a copy of the tools folder itself (keeping it at the same directory tree
level, thus "tools" and "tools-copy" were both in the "android-sdk-windows" folder).
I ran Android.bat from that copy
I ran the update without problems (it updated the original,
not-being-used-at-the-moment tools folder, among whatever other items it needed to).
I closed the SDK, deleted the folder (I had to kill the adb.exe process first - not
sure why that always persists but you can't delete the folder without doing that).
I restarted the SDK from the normal (now-updated) tools folder. Worked like a charm!
Note that simply killing adb.exe was NOT sufficient to get around the original
issue... only by copying the tools folder and using the copy to run Android for the
duration of the update process was enough to rectify the problem.
I hope this helps others... it's quite vexing to have to spend time resolving basic
issues like this just to run an update.
If you open /Users/{your name}/android sdks/tools/android (double click it), then click on "Android SDK Manager" menu and then "Preferences" and then you can change your proxy settings specifically for Android SDK Manager. These proxy settings also apply to "Android SDK Manager" if used within Eclipse.
After 7 long hours of searching I finally found the way!!
None of the above solutions worked, only one of them pointed towards the issue!
If you are on Win7, then your Firewall blocks the SDK Manager from retrieving the addon list.
You will have to add "android.bat" and "java.exe" to the trusted files and bingo! everything will start working!!
I had the same problem, made all the workarounds you advised: still the same error.
I updated Eclipse via "Help / Check for updates" and now everything is ok.
This update brought a completely new version of the Android SDK Manager.
Also, try to turn off your firewall and try to update with link.
I had the same problem. I use Ubuntu 12.04. I tried disabling ipv6.
Modify the /etc/sysctl.conf and add the following:
#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Then restart the machine and check. I think this may be a ipv6 issue even in Windows OS.
I had a similar situation where I had the proxy settings already set and the SDK manager wasn't able to modify them permanently. Modifying manually the ~/.android/androidtool.cfg file fixed the issue.
Had the same issue on 64 bit win7 machine on company network behind proxy with automatically detected settings.
After a number of trials and failures the following workaround proved to be successful:
sharing my phone's wifi internet connection via USB
Best regards,
Robert
I found another way without setting proxy. I'm currently using an antivirus which has a firewall program. Then, I turn off this firewall and now I can fetch that URL.
If still doesn't work, try to turn off Firewall on your PC, such as Windows Firewall.

Categories

Resources