"Check update" is not working in android studio - android-studio

I have tried to "check update" in android studio
Help>Check for Updates
but it says
Connection failed. Please check your network connection and try again
But my Internet is working fine. .I've also tried to switch off my firewall. Is this bug of google service?

Update : Whenever updates | installations are failed, start the android studio as administrator.
Old Answer:
This is possibly a bug of Android Studio.
The following steps may help to fix this issue:
Open configuration
Select Settings
Select HTTP Proxy
Set to use no proxy
Restart Andriod studio

start the android studio as administrator. that helps me in android studio whenever updates/installations are failed.

Maybe u can try: Settings -> System settings -> HTTP Proxy -> auto-detect proxy settings.

I had the same problem. To fix I had to manually download a newer version from https://developer.android.com/studio/.
I'm currently running Android Studio 3.2.1 and it updates fine.
Also, in Preferences > Appearance & Behavior > System Settings > HTTP Proxy make sure that Auto-detect proxy settings is checked.
Check Screenshot

It doesn't seem to be a bug. I can confirm that the update worked perfectly fine on my home network. When on my office network, trying to update gives a connection error.
Must have something to do with the firewall...or some service that's not Checked to handle connections based on domain/home/public policies.

I tried no proxy option at both office and home network.
At home, "Check Update" works fine, but getting the error you mentioned with office network.
To avoid this error, you need to provide the proxy details from your office IT administrator.

It may be an also problem for VPN connected users. Try to disconnect and check for updates it will work. It worked for me

Related

Android studio cant download sdk with v2ray

I am an Android developer in Iran
There are too many restrictions for the Internet
Fortunately, V2ray
has solved the problem to some extent, but Android Studio has serious problems with V2ray
no library is downloaded, it does not even allow to download SDK.
I have tried all the VPNs but none of them work
IN IRAN no VPN is working to use for android studio these days , only proxy is available , do it this way inside AS :
IN WINDOWS GO TO Setting >
Appearance & Behavior ->System Settings -> Http Proxy
http proxy
Manual proxy configuration
MORE :
https://dazhyarco.net/%D9%86%D8%B5%D8%A8-%D8%A7%D9%86%D8%AF%D8%B1%D9%88%DB%8C%D8%AF-%D8%A7%D8%B3%D8%AA%D9%88%D8%AF%DB%8C%D9%88/#
CHANGE :
Host name > fodev.org
Port number > 8118
Apply AND OK
.
Thank you #iDeveloper
even you can use the auto-detect proxy setting and android studio use the proxy setting of os that you run v2ray
Like you, I am in Iran
use this dns in your pc :
178.22.122.100
185.51.200.2
AND turn off v2ray.
or use similar site of shekan.ir

No Android SDK found SDK tools directory missing

Basically I just installed for the first time in my life Android Studio android-studio-ide-182.5264788-windows.exe and when I open it I get:
Missing SDK, No Android found SDK found
I also checked this path: C:\Users\<user>\AppData\Local but I have not found and Android folder there because I was looking for C:\Users\<user>\AppData\Local\Android\Sdk
If I press next next finish I get:
Nothing to do!
Android SDK is up to date.
SDK tools directory is missing
I have also checked all kind of solutions posted on the internet but none of them fixed my problem.
I figured it out meanwhile but I forgot to update the question. Basically I had those issues because of the corporate proxy which was blocking some resources when installation was in progress.
The solution for me was to configure the proxy inside Android Studio under System Settings > HTTP Proxy. I have set it to Manual proxy configuration.
Besides this I also had to configure some security certificate inside the Java Version which was used by Android Studio. I used this code to do that: https://knowledge.digicert.com/solution/SO4085.html
The last thing was to run this: sdkmanager --licenses. I tried first in cmd but it was not working, I don't know for what reason but after I tried in Idea it worked.
After all of these, it worked. I had a small issue with the .. but it got fixed after I went in Setings > Build, Execution, Deployment > Instant Run and disabled Instant Run.
Download the zip file: http://dl.google.com/android/android-sdk_r24.4.1-windows.zip
Unzip it to SDK directory, and files like this:
D:\Android_sdk\platforms
D:\Android_sdk\tools
D:\Android_sdk\SDK Manager.exe
D:\Android_sdk\SDK Readme.txt
Restart Adnroid Studio, Configure->SDK Manager
Then you can change the Android SDK Location to your SDK path
After installation Click on configuration Go to SDK manager -> SDK tools and
uncheck “Hide Obsolete Packages”
Refer the image
after that check the mentioned package and install it –
C:\Users..\AppData\Local\Android\Sdk\tools\bin is created or not.
After creating project
Go to Tools
AVD manager
Your virtual device -> Create virtual device
Select Hardware :- Nexus 5x (Resolution)
Next
Check the latest or download latest one (OS)
Next
As it is default settings
Launch Virtual device
network adapter ipv4 settings or proxy.. I checked that, then it solved.

Unable to access Android SDK add-on list

I'm new to Android programming. I was installing the Android studio and it got stuck at one point during installation showing the following message.
So, don't to how to proceed, I searched about it, but couldn't get explanation about this specific condition.
Can someone explain what to do next?
Screenshot:
Note: I'm using Windows 7, Installed JDK 7 before installing Android studio.
Update: I tried to click upon "Setup Proxy" and then just clicked ok without doing anything and it worked, don't know how, but it did.
Try that if any one face the same.
Add the following code to C:\Program Files\Android\Android Studio\bin\idea.properties
disable.android.first.run=true
Just open the file and press Ctrl+F and type run then you will find this run=false, change it to true.
1) click on set up proxy.
2) Select option Auto Detect proxy.
3) Click continue, it will work!!
All the best
I clicked Cancel at this screen and process of setup continued. I saw it on Linux after copying android studio folder from one PC to another. By the way, I started studio not connected to Internet cause I try to be able to work offline.
I just hit this same problem - I was on a VPN.
I tried setting a proxy with 'auto detect proxy settings' but it did not help.
Then I tried disconnecting from the VPN with no proxy set - this resolved the problem for me.
good luck.
You can set the right proxy to solve this problem.
Set proxy ->
Manule...
Https and port
Sometimes,if you use Shadowsocks on your macOS, maybe you will have the same problem.You can turn Shadowsocks off to deal with this problem.
I finally solved the problem by following the Steps:
Add the following code to "C:\Program Files\Android\Android Studio\bin\idea.properties"
Open idea.properties with notepad
Then, enter the code below anywhere on a new line in the file (see attached image)
Code :
disable.android.first.run=true
Save the file
Run the application
Clear your DNS if there is any dns server settings like google, comodo,
symantec etc.
Check your firewall settings if you are using tinywall, zonealarm etc.
If your computer and network connection doesn't have any dns settings and firewall; then check your internet connection maybe there is an update process to slowing down your internet speed. So if there is a process stop or wait for it. And try again. Good luck...
Yet another reason why this can happen is when your time and date settings are not synchronized correctly. I installed android studio inside a virtual machine linux guest that didn't properly synchronize the time with the windows host and as a consequence the above message occured even though my internet connection was working fine.

Script Error when trying to login Team Foundation Server in Visual Studio 2012

I have Visual Studio Ultimate 2012 that is working fine except for one issue. Whenever I try to connect through the sign in Wizard to Team Foundation Server I get an error in a popup Titled: "Script Error" as if it can't render the result or something. here are more info on the subject
Line: 4
Char: 16405
Error: Object doesn't support this property or method
code: 0
URL: https://....../TFS/Loader.min.js
Any suggestions? (I tried re-installing but the same issue shows)
I had the same issue. I generally use Chrome, the version of MSIE installed was IE 8. When i updated to IE 11 the issue was resolved.
As I'm using Windows Server 2008, I couldn't find a way to reinstall IE (only to enable/disable it), so this solution didn't work for me. But there is other workaround I found. When you try to connect to tfs server and the browser window "Sign in to TFS" inside Visual Studio opens with javascript error and then nothing happens, right click on the window and select "Properties" find Addres (URL) and copy full path (https://app.vssps.visualstudio.com/_signin?realm=...). Paste this to Internet Expolorer (doesn't work with other browsers) and sign in to tfs and you'll be redirected to some tfs web service. After this switch back to Visual Studio and try to connect to tfs again. This time you should connect without need to log in.
I only needed to set IE as my default browser and it corrected the issue for me.
Yes!!!! I found sol'n
Un-install IE using control panel.
Install it again and make IE default browser with recommened settings.
and you done.
Worked for my case
Update to to IE 11 and everything will work fine.
Update of IE is not an option for me. I need it for testing on this machine. In my case following helped me:
I opened developer tools of IE8 (press F12). It was in 'IE8 Compat View' mode. I switched to 'IE8' mode and specified Document mode to 'IE8 Standards'.
Then I were able to sign in to TFS through IE8. Once I signed in using browser I restarted Visual Studio and everything worked correctly.

Error TF30063: You are not authorized to access ... \DefaultCollection

I'm using TFS Preview (Team Foundation Service) with one of my projects with Visual Studio 2012. I'm also using an on-premises TFS server with most of my projects. When I use my on-premises TFS after using TFS preview and go back to using TFS preview, I get this error:
TF30063: You are not authorized to access MyProject\DefaultCollection.
If I go to Team → Disconnect TFS and then connect to TFS preview again, I'm able to see a "Loading identifiers" loading screen coming up, but in the end I don't get to enter my credentials to TFS preview (my Microsoft account) and as a result, the TF30063 error still occurs.
I suspect this has something to do with my Microsoft account (i.e. Live ID). I'm logged in to Windows with the same Microsoft account that I use at TFS preview. I have logged in to other sites (Windows Development Center, MSDN, etc.) with other Microsoft accounts, but I verified that if I log out of these services and re-login with the correct Microsoft account, I still get the TF30063 error when I try to log in to TFS preview from Visual Studio.
When I came accross this issue none of the provided answers solved this problem or if it did I didn't like recreating the project. The way I ended up solving the issue:
Clicking on the "Connect to Team Projects button" (The plug next to the home button in the Team Explorer tab)
Right click the project you are getting this issue on.
Click Connect.
I guess the "Remember me" cookie timed out but gave me a generic response for trying to push or pull any code.
I solved this issue by using the browser from within Visual Studio, View->Other Windows->Web Browser; Ctrl+Alt+R (or * Ctrl+W, W* in VS versions before VS2010) to navigate to the TFS page and log out of the wrong account and log back in.
For me, the issue was caused by using another live-id to unlock a windows phone for development. Somehow the credentials got cached, it seems.
For me the error came after changing my password for my AD account.
I had to remove the line from credential manager (which contained the previous password.)
Then it worked again.
I have upgraded TFS 2015 to TFS 2017, and then the TF30063 error occured on one of my client machines. None of the solutions here worked...
For me the only solution that worked was running the following command from the Developer Command Prompt:
tf workspaces /collection:https://tfs.xxxxx.com/tfs/DefaultCollection
Of course, you need to adjust the url to the valid one.
Source: https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/backup/refresh-data-caches
The TFS Preview login apparently uses Internet Explorer and thus might conflict with other MS Accounts you are using. Fully clearing the IE cache seems to work for me. After the cache clearing, I get to the correct login screen and may enter my credentials as needed.
I tried all of the suggestions here. None worked. This could be my particular situation where I connect some VS instances to our company TFS and some instances to my private TFS.
The only way to solve it for me is to close all VS instances and start a new instance.
Oddly enough, connecting to the internal TFS is never a problem. Connecting to *.visualstudio.com sometimes raises this issue.
In VS 2015 it can be achieved by
Team Explorer > Connect > Manage Connections
and selecting the team project again. In case of there exist more than one account in VS, Team Explorer asks for which account to use to connect to the team project.
I tried the following to resolve this issue. Hopefully one of these will work for you
A - Close VS then start the VS Developer Command prompt as an administrator. Then enter: devenv /resetuserdata
B - Clear the cache in IE (apparently VS uses this to access your account mentioned here)
C - Click View -> Other Window -> Web browser (CTRL+ALT+r) sign in to your old account, log out and sign in to your new one
D - Open the folder containing you solution, delete (backup if you want) the Visual Studio Source Control Solution Metadata File delete the .suo file and open the .sln file in Notepad and delete the below section
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 6
SccEnterpriseProvider = {**********************}
SccTeamFoundationServer = theServer
SccLocalPath0 = .
SccProjectUniqueName1 = pro
SccProjectName1 = myProject.BL
SccLocalPath1 = myProject.BL
.....more stuff.....
EndGlobalSection
The last step was required because, while I had managed to disconnect VS my solution was still trying to connect to the old source control account.
Make sure that Windows Authentication hasn't been disabled for the Website / Application within IIS.
I'm not sure HOW this happened, but I did uninstall Hyper-V today to be able to install VMWare Player and then re-install Hyper-V
Reenabling this allowed everything to work again.
In team explorer I removed project... then in Manage Connections, clicked on 'Connect to a Project...'
In this screen choose your project then click on Connect... this solved my problem.
This happens to me regularly, and none of the solutions described above works every time.
Most of the times the solution where you use the "Connect to Team Projects button" works fine, but sometimes nothing happens when I do this.
Other times I simply have to re-login to http://tfs.visualstudio.com using the Visual Studio built-in browser (Ctrl+Alt+R) or via Internet Explorer.
(As suggested in some of the other answers, for my part this is not caused by multiple live-ids)
None of the current answers worked for me. I found a solution here.
The issue was that my previous credentials were cached by the Windows
OS for the TFS server. While some people might have had success wiping
out the AppData temp folders, that is not required.
You need to update the credentials through Control Panel on the
Windows OS.
For me on Windows 10: Close VS. Go to Control Panel (with small icon
view)-->User Accounts-->Manage your credentials (on the left
column)-->Select "Windows Credentials"-->Scroll down to the "Generic
Credentials" section and look for your TFS server connection. Expand
the pull down and click "Edit". Enter in new network password. Reopen
VS and everything should work again.
Just restarting the visual Studio would do the job. As I did this and it worked like a charm
I have just removed the server from Team Explorer, then added again, and it worked =).
When Visual Studio prompted me for Visual Studio Team Services credentials there are two options:
Use a "Work or School"
Use a "Personal" account
In my situation I was using a work email address, however, I had to select "Personal" in order to get connected. Selecting "Work or School" gave me the "tf30063 you are not authorized to access..." error.
For some reason my email address appears to be registered as "personal" even though everything is setup in Office 365 / Azure as a company. I believe the Microsoft account was created prior to our Silver Partnership status with Microsoft.
Disconnect from Team Fountation Server under Team Menu and reconnect it from Connect Tab under Team Explorer Window
I got this error, after all fiddling work I could do — the disk space was full!
Clearing it fixed my issue.
I was also facing the same issue as you did. Here is what I did to solve:
METHOD 1
Click the 'Connect' icon just next to Home icon in Solution Explorer.
Choose your project > Right Click > Connect.
Try Check-in the project and this time it will happily proceed.
This is what I tried, and I did not need to logout from any sessions from TFS or VS Account.
METHOD 2
Just press refresh on the top of Team Explorer.
Try to Check-in.
This is also easy method.
Hope this helps.
I had to "run as a different user" to get Visual Studio to connect using my TFS account. It seemed to be trying to use my Microsoft account instead.
Text and image from: https://www.visualstudio.com/en-us/docs/connect/connect-team-projects
To change accounts
To run Visual Studio under an account that is different from your logged on Windows account, open the context menu for devenv.exe to access your run as options.
You can locate the executable in the following folder: Drive:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE.
I've experienced this issue after an TFS upgrade, and somehow Visual Studio is caching invalid login credentials. I've found two ways to fix it, first, using this answer I completely reset Visual Studio, then reconnected:
Click on menu Tools → Import and Export Settings → Reset all settings → Next → "No, just reset settings, overwriting all current settings" → Next → Finish.
For some strange reason, after the reset it connected without issue (I didn't even have to re-enter my credentials or reconfigure TFS after the reset).
The second approach was easier. First close all instances of Internet Explorer and Visual Studio, then open Internet Explorer and browse to TFS, login, then open Visual Studio again and attempt to connect to TFS one more time.
I finally found the right answer for me on the web.
For me it happened after I changed my password and Windows cached the TFS password. It is require to be updated manually. This is one way to do it:
Solution found at: developercommunity.visualstudio.com
CREDIT: Lavente Nagy! Thanks so much!
Fix Summary:
I found a solution, and it works on Windows 7/Windows 10 too. The steps are the same:
Close Visual Studio. Go to Control Panel (with small icon view) → User
Accounts → Manage your credentials (on the left column) → Select
"Windows Credentials" → Scroll down to the "Generic Credentials"
section and look for your TFS server connection. Expand the pull down
and click "Edit". Enter in new network password. Reopen Visual Studio and
everything should work again.
Check the information in registry :
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSCommon\Keychain\Accounts and delete the related keys under Accounts section.
Clear the cache in these paths:
%localappdata%\Microsoft\TeamTest
%localappdata%\Microsoft\Team Foundation
%localappdata%\Microsoft\VisualStudio
%appdata%\Roaming\Microsoft\VisualStudio
Hope this will work.
Note: By doing this may clear all the cookies and caches and load the Visual Studio New.
What isn't officially an answer here, but worked for me (the other answers didn't help):
Click Team Explorer tab -> Connect hyperlink - connect\choose repository. And it works.
Make sure your password hasn't coincidentally expired exactly on the same day you decided to install a new dev machine.
If you can't even log into TFS using the web interface then this may be the case.
Now I got the solution to the problem which I have faced:
The TFS remembered the prior password when I got logged in by using my mobile VPN.
Solution:
Resetting the account that I used to connect using VPN
I get this problem when I am forced by our IT security policy to change my password. After a password change, when I connect to TFS using VS2017, I am no longer authorized to access our TFS server and get the TF30063: You are not authorised to access ...:8080/tfs error message.
However, if I connect using VS2013, I can connect to the server without problems and the access denied error with VS2017 goes away.
It would be a lot easier if the error message were to tell us the username it's trying to access TFS with.
I've been coping with this for a while, and usually logging back in only for the next day to stop again.
I found I had two accounts and removing the unwanted one fixed the issue.
This is under Help > Register Visual Studio
Try making Internet Explorer your default browser temporarily.
In my case I had a proxy. I had edited the devenv.exe.config and set the proxy there. But today I changed the proxy domain password and TFS failed (menu View → Windows → Browser also failed). I could of course have edited the devenv.exe again. But there was a solution to remove it altogether. A brilliant one. It is given here.
Open menu TOOLS* → Extensions & Updates.
Click on Updates... in the left-hand menu
Here it asks for password and restarting Visual Studio. All okay. For more info, look for the answer in the link.
press Win button, then type credential manager and open it .
Add generic credentials.
Go back to team explorer, add the server again.

Resources