I'am trying to install Android studio, but bad luck..:-(.
Windows 7
Latest Andriod studio
Latest Java
Installed the latest Java and also added it to the system settings according to http://www.youtube.com/watch?v=TTrUX1kUpDo
Also downloaded Gradle and updated the system settings
Stopped all firewall actions
So far so good, Android studio is also starting without any problems. But then I get two messages:
Internal HTTP server disabled: Cannot start internal HTTP server. Git integration, JavaScript debugger and LiveEdit may operate with errors. Please check your firewall settings and restart Android Studio
Gradle 'Nieuwproject' project refresh failed: Connection refused: connect
So after a few days of trying I was hoping that somebody could help me out..:-)
Here's what worked for me - I got the same error:
Internal HTTP server disabled: Cannot start internal HTTP server. Git integration, JavaScript debugger and LiveEdit may operate with errors. Please check your firewall settings and restart Android Studio
Run command prompt as administrator - type cmd in the 'search programs and files' text box in the Windows Start menu; right-click and select 'Run as administrator'.
At the command prompt, type
netsh winsock reset
Restart your PC
This worked for me.
Just to mention: I also added Android Studio and Gradle folders to my virus protection exceptions in case it was being blocked, but that didn't resolve the problem; the problem was only resolved once I followed the steps above.
Turn OFF firewall then turn ON again.
Sometimes firewall blocks it automatically when you start your PC. It also blocks to internet browsing for other reason but restarting firewall may solve this problem.
I encountered this problem after uninstalling Avast from my Computer,few days later i installed Avast again and the problem went away,Dont know what the connection is but thats what solved my problem
if Shell&ServicesEngine is installed on your computer, uninstall it and restart the Android Studio.
Related
I installed Unity and following tutorial from GoogleAR.
I faced some difficulties and managed till installation of app in mobile by lot of internet search.
Now, the app is installed in my Android mobile by unity, but not opening by itself due to the following error
CommandInvokationFailure: Unable to forward network traffic to device.
Please make sure the Android SDK is installed and is properly
configured in the Editor. See the Console for more details. /home/_____/Android/Sdk/platform-tools/adb -s "number" forward "tcp:34999" "localabstract:Unity-com.example.helloAR"
What causes this issue and how to overcome it?
Note that I did un-check Development Build, but still not working.
Looks like a bug in UnityEditor on Linux, where it opens port 34999, and adb fails to do the port forwarding because it's in use.
https://issuetracker.unity3d.com/issues/android-linux-unable-to-forward-network-traffic-to-device-when-trying-to-build-and-run-a-development-build
While it's being fixed, workarounds:
The app should be successfully installed to the device, so you can run it manually from the Apps menu.
Close Unity editor, run adb forward "tcp:34999" "localabstract:Unity-com.your.packagename" and open the editor again. This way you make the port used by adb so that later it works when building.
For Windows: just kill adb.exe and Build&Run again. Work for me every time :) You don't even need to restart the Editor.
Ctrl+Alt+Del -> Task Manager
kill this task
On Windows, I was able to fix the issue by simply restarting the Editor.
In my android studio 3.0 i am continuously getting this error -
Cannot start internal HTTP server. Git integration, JavaScript debugger and LiveEdit may operate with errors. Please check your firewall settings and restart Android Studio.
after this my gradle sync also failed stating the error -
Gradle sync failed: Could not connect to server [a3ea2c7d-cc16-4af2-82a9-037277903c02 port:49555, addresses:[/127.0.0.1]]. Tried addresses: [/127.0.0.1].
One thing to note down that this gradle sync failed when it(gradle) is connecting to gradle daemon.
i have tried all the options from stack overflow like netsh winsock reset etc.
But nothing work for me.
Also to mention i do not use embedded JDK in AS. I have provided it my downloaded jdk8.
How to solve this problem.
Thanks in advance.
Make sure your machine is connected to the internet.
Check the link here: Configure Android Studio - Proxy
I personally recommend that you try disabling the proxy if it is enabled.
Go to Windows Firewall -> Inbound & Outbound Rules -> add java.exe from JDK path & studio.exe from Android Studio directory.
I just installed Android studio 2.3.1, but after starting it is telling me "Grade sync failed: connection time out: connect consult IDE log for more details". Pls I don't know what to do.
Caused by: java.util.zip.ZipException: error in opening zip file
This mean that a file that Gradle has downloaded has become corrupted due to somehow or some reason. This might be the download of Gradle itself (which the wrapper does) or any dependency that Gradle has downloaded to run your build.
Gradle doesn't attempt to detect or resolve the problem, so you need to fix it manually. The solution is often to purge Gradle's download caches and let it get fresh copies of what it needs.
To do that, delete the .gradle directories in both your home directory and in your project's root directory and try building again.
In window home directory of gradle is
C:\Users\User.gradle
In Mac OSX home directory
/Users/User_name/.gradle
If you still haven't figured out this problem yet, it's because you literally have no internet connection which is mandatory for gradle building since the platform checks for potential updates for say, sdk versions, from a server.
However, if you want to build and do your work offline, then go to File -> Settings -> Build, Execution, Deployment -> Gradle -> Check Offline work under Global Gradle settings
With reference to #DaveNOTDavid's answer, i tried this: Go to File->Settings->Build,Execution,Deployment->Gradle-> and select "Use default gradle wrapper(recommended)". Then sync your project, everything will work fine. But you need an internet connection.
I was facing the same issue while downloading the gradle zip from https://services.gradle.org/distributions/gradle-4.1-all.zip. My issue related to proxy settings, I disabled the proxy & click on Try Again button in build.gradle file.
In my case i activated antivirus it blocks the downloading gradle files turn of your firewall settings
Click on the SDK Manager and click SDK Tools and check if NDK and CMAKE are checked or not. If they are not checked download and install them. And if the problem persists just try it with a stable internet connection with a fast or a moderate speed. It had happened with me also when I was doing it with mobile phone internet then I tried it with a broadband with fast internet.
Basically it's a network issue. if you are working using wifi use vpn that would solve the problem
connection timed out:
solution: Just disable your anti-virus for an hour and restart the android studios, in my case my antivirus blocked the connection. while restarting the android studios firewall will ask you the permission, allow it and its all done. The gradle will build successfully
These situations generally occur due to the problem in downloading Gradle components, to overcome this, check your internet proxy and connection properly.
Just try to use some other source internet connection instead of the one you were using while having this error. Like I faced the same problem and I disconnected my system from the wifi and connected it to my personal mobile hotspot. then go to file->Invalidate Caches/ Restart...
and your Gradle will build successfully this time.
I'm trying to install and start learning Android Development. I have tried a lot of things to get Android Studio working, but I simply can't!
There are 2 errors:
Gradle 'MyFirstApp' project refresh failed - Error:Protocol family
unavailable
and
Internal HTTP server disabled: Cannot start internal HTTP server. Git
integration, JavaScript debugger and LiveEdit may operate with errors.
Please check your firewall settings and restart Android Studio
Here what I already did:
For Gradle:
tried to uninstall deleting all folders and files regarding AS 1.5.1 and reinstall
checked for java environment variables
reinstall just gradle
For Internal HTTP:
disabled Kaspersky Internet Security (version 16.0.0.614(d))
checked if any other service or software could be using some known ports, disabled as much as I could
uninstall and try a fresh install as I did for gradle
Nothing works!
I always install with Kaspersky temporaly disabled and I run the installation package as administrator
Some data that might be useful:
SO: Windows 10 Pro (single language en-us)
Android Studio: 1.5.1 (android-studio-bundle-141.2456560-windows)
What else do you need?
Can anyone help me?
Thanks a lot!
UPDATE:
I have just installed on another computer running Windows 10 (home) 64bit with Java JDK 1.8 U 66 just like the first attempt, i.e., with both firewall & anti-virus software disabled and with administrator privileges.
The problem is exactly the same.
:(
So I am relatively new to Android dev. and have been getting Android Studio set up on my computers. I have it set up just fine on my Mac. When I downloaded and installed it on my Windows 8.1 desktop the gradle build seems to fail every time. With an error message stating that the Protocol Family Unavailable. I've tried several things including uninstalling and reinstalling Android Studio.
NOTE: I did try what was said to work here Gradle project refresh failed - Protocol family unavailable yet it did not solve the problem for me.
When I used Stunnel I faced this problem and my problem was solved when I disconnented it.
Check too see if you have any Stunnel, Vpn or Proxy connection and if so, disconnect it.
I also had this problem and the referenced thread also didn't work for me.
What did work was setting _JAVA_OPTIONS environment variable to make Java use IPv4.
_JAVA_OPTIONS = -Djava.net.preferIPv4Stack=true
Note that Android Studio sets this variable in the vmoptions file. But for some reason, it isn't used by the Java VM started by Android Studio to run Gradle daemon.
After I did that, everything started to work ok and Gradle could build my project.
I hope it helps.
I run into this problem when my firewall blocked studio64.exe from connecting to the internet. I fixed it by granting access.
You could try to fix it temporarily by disabling your anti-virus software while using Android Studio. I'm not entirely sure it will work, but it's worth a try, it worked for me, though I'm aware-, and agree with that this is far from a permanent fix, but it might be good enough while waiting for a fix from the Android Studio team, at least it will let you keep working!
Hope this helps!
"Run command prompt as administrator - type cmd in the 'search programs and files' text box in the Windows Start menu; right-click and select 'Run as administrator'.
At the command prompt, type
netsh winsock reset
Restart your PC
This worked for me."
I found it in
Android studio "Cannot start internal HTTP server"
My problem was using a VPN on an per-app basis connection mode while Android Studio was blocked.
I solved same problem by disabling antivirus.
for me proxifire.exe was running in background and cause to connection problem, after closing problem gone
This answer is same as first answer in this topic, means first answer is true and works well, but my answer is in detail, i did not set that variable, just turn off proxy.
This error arises due to proxifier running that basically tunnels the computer in ipv6 which is not supported by daemon.
So to overcome this and build project either close the proxifier application from system tray or add the environment variable
_JAVA_OPTIONS= -http://Djava.net.preferIPv4Stack=true