1. Fault
Android studio start error: internal error
java.util.concurrent.CompletionException: java.net.BindException: Address already in use
the IDE cannot be opened due to such an error
2. General solutions
According to the analysis of many people, it is necessary to use Netsh Winsock reset on CMD to reset the network:
netsh winsock reset
If you restart your computer and open Android Studio again, you can open it successfully if you open it immediately, but if you open Android Studio after a while after your computer restarts, you may still report an error and cannot open it. There is also a possibility that if you open it this time, you will not be able to open it again next time.
So this solution does not work.
On the Internet, there are also those who turn off the firewall, and add a line of code disable.android.first.run=true at the end of Android Studio\bin\idea.properties in the installation directory, but they are not reliable.
Uninstall Android Studio and reinstall it.
3. The ultimate solution
Android Studio will start the server on the local host for internal processes and try to bind on any port between 6942 and 6991. And the computer Hyper-V will reserve many ports, once the ports 6942~6991 are in reserved state, Android Studio cannot be opened (report java.util.concurrent.CompletionException: java.net: Address already in use error).
Check the reserved port using the command.
netsh int ipv4 show excludedportrange protocol=tcp
Solution: exclude the port range we need and don’t let Hyper-V keep it
Restart the computer, open CMD with administrator authority
, and enter the following instructions:
netsh int ip add excludedportrange protocol=tcp startport=6942 numberofports=50
It’s that simple. If you solve the problem, there will be no problem that Android studio can’t open and report errors in the future.
Such errors may occur when using the above instructions:
This is because, after restarting the computer, the commands are entered too slowly and are taken up by Hyper-V before they have a chance to be executed. Remember to be fast.
Or, go to the BIOS to turn Hyper-V off, then start the computer, slowly enter the above instructions, and when the instructions are finished, go to the BIOS to turn on Hyper-V
Read More:
- [Solved] Windows Android Studio Cannot Start Error: Internal error. Please refer to https://code.google.com/p/android/issue
- [Solved] Android Studio Start Error: Missing essential plugin: org.jetbrains.android Please reinstall Android
- Android studio can’t start, running error: warning: crash service did not start
- [Solved] Android Studio Change Project Error: Error while executing: am start
- [Solved] Android Studio Run Error: Error while executing: am start -n
- Android studio version 3.0 import version 2.2.2 error Error:This Gradle plugin requires Studio 3.0 minimum
- [Solved] Android-android studio apk Install Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
- Android studio does not prompt error messages [How to Solve]
- [Solved] Android Studio Compile Error: Could not determine java version from ‘11.0.8‘.
- Android Studio: Gradle project sync failed [How to Solve]
- [Solved] Android Studio 4.1 get manifestOutputDirectory error
- [Solved] Android Studio Error:SDK location not found.
- Android Studio HAXM is not installed [How to Solve]
- [Solved] Failed to apply plugin appears when Android studio imports a project
- Android Studio error: unrecognized Attribute name MODULE
- Android studio configurate intent-filter and compile error [Solved]
- Android studio Error:Execution failed for task ‘: app:transformResourcesWithMergeJavaResForDebug ‘
- Android Studio Error: String index out of range 0 [How to Solve]
- [Solved] Android Studio Error: Use of undeclared identifier ‘cv‘
- [Solved] Android Studio Error: CreateProcess error = 206 file name or extension is too long