unable to connect to adb.check the event log for a possible issue, verify that localhost entry is pointing to 127.0.0.1 or:: 1 for ipv4 or ipv6
Tried adb kill-server, restart, invalidate restart nothing works.
Same issue reported over here https://issuetracker.google.com/issues/130791561
Note: I have not added any file or anything in studio, it's fresh installed Studio after format a full system still issue is there.
Replace your platform-tools with this one and delete the other one.
https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip
I was also facing this issue in android Studio 3.4 version, but now I have fixed it , if you are using windows then follow these steps:
Download Platform tools from here
https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip
Extract downloaded zip file
Go To location "C:\Users\your_computer_user_name\AppData\Local\Android\Sdk" and Delete "Platform tools" folder
Copy and Paste, downloaded platform tool folder to above location
Now Go to your android studio and Rebuild your project Then run.
For Mac Users, follow these simple steps :
Just simply Navigate to Tools > SDK Manager> Android SDK>, then click on the Tab of SDK Tools, then look for Android SDK Platform-tools and update it.
Then the last step, Invalidate cache and restart your IDE, after that, then finally you restart your Mac. (Sometimes it's this step is unnecessary)
It will work out successfully.
Solution for Linux Users.
System info: Linux Mint Cinnamon 19.1 , Android Studio 3.4.1
Issue description: Problem with platform tools.
Solution: Remove the folder manually and update SDK tools through Android Studio.
Step 1: Go to your Android SDK installation folder. By default under your home directory. Choose platform-tools and simply delete. (/home//Android/SDK)
Step 2: Open Android Studio and go to SDK Tools. (File -> Settings -> Appearance & Behaviour -> System Settings -> Android SDK -> SDK Tools) By the moment you should be able to see Android SDK Platform Tools line unchecked.
Step 3: Put a check to install Platform Tools and press OK. Notice it'll relocate the folder to the directory where deleted.
Now that you re-installed the platform tools, restart the Android Studio and your deployment targets should show up.
If you don't install the platform tool back and ever try to build or run a project you'll get this IDE error. Just FYI :)
So that's all. Enjoy.
Happy coding
If you use Windows, you might have a corruption in api-ms-win-crt-runtime-l1-1-0.dll.
Try to update it - you can get the update from Microsoft's website.
You should check it - path/to/sdk/platform-tools and try to run adb.exe
When you update Sdk platform tools(which contains adb.exe) to release 28.0.2 and if you are using windows 8.1 then it needs few updates from windows.
As per SDK Platform tools release notes(https://developer.android.com/studio/releases/platform-tools):
Updated Windows requirements : The platform tools now depend on the Windows Universal C Runtime, which is usually installed by default via Windows Update. If you see errors mentioning missing DLLs, you may need to manually fetch and install the runtime package."
Windows update url: https://support.microsoft.com/en-ca/help/2999226/update-for-universal-c-runtime-in-windows
Prerequisite for Windows update url: https://www.microsoft.com/en-us/download/details.aspx?id=42327
Faced the exact same issue but after updating with prerequisite url first then the other url provided now it is working perfectly fine for me.
It worked for me by selecting -> Use libusb backend
This worked for me on Windows:
Goto cmd write %temp% hit enter -> delete all data from there.
Restart your Computer.
Open Android Studio now, it will work.
Clear all cache memory (related to Android Studio)
Restart ADB manually from Android Studio (first option)
Open Command prompt and got android sdk>platform-tools> adb kill-server
press enter
and again adb start-server
press enter
Restart ADB manually form Android Stidio (second option)
go to your (SDK store path) sdk>platform-tools>adb
press enter
ex. D drive > sdk>platform-tools>adb
Restart your system
Delete the platform-tools folder from the sdk and replacing with the same from your another pc. I am also facing this problem after updating to 3.4. If you face same problem please update to Android Studio 3.5 Canary Channel.
The reason is for ADB server problem. Simply re-run your adb.
(Go to your SDK folder then inside platform-tools folder you can see adb.exe. copy the path location and paste it in your computers system Environment variable. Set a new path there and paste the adb.exe file location there. hope it will solve )
If you are using Genymotion, there is an update that fix the problem.
Genymotion 3.0.2 (April 18th, 2019)
Corrections
We have fixed an
incompatibility with the adb tool bundled in the platform-tools 28.0.2
package of the Android SDK, which caused failures to start virtual
devices.
This new version of adb changed the behavior of the “adb connect
:” command by making the “port” part mandatory. This
broke Genymotion Desktop in a few places where it did not pass the
port. We have adjusted the way we call “adb connect” and also updated
the version we ship with the product to match the one in
platform-tools 28.0.2.
If non of the above answers worked for you (as same happend to me), down grade to the old version of Android Studio by following these steps:
Uninstall current Android Studio
Go to Android Studio Archive and download any older version
After installation, Open the project. You might see an error like this
This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer.
Now, open project gradle and update classpath tools.build version. I.e. in my case Android studio version is 3.2 and classpath 3.2.1
Hope it might save someone time.
I faced this issue last night, and I tried these methods to fix:
download older platform-tools and place it in the android sdk folder.(not work for me)
adb kill-server, adb start-server.(not work for me, adb had no response with these cmd)
kill the process that occupies port 5037.(for me, there is no other .exe run at this port)
reinstall platform-tools in Android Studio.(not work)
download ADB Kits and replace them in platform-tools folder.(work!!!)
It seems that my adb file has been modified or replaced by some programs. You can try these methods, and I hope some of them can work for you.
I had this issue only after a Genymotion update, on Mac.
What worked for me: Open Genymotion preferences, Select ADB, choose "Use custom Android SDK tools" and points to your Android SDK folder.
Actually the problem is not with the android studio version 3.4
Problem is with the android platform tools version which is latest one 29.
So install the previous version of the android platform tools version it will solve your problem. as above #Ved mentioned.
Ved link:
https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip
EndTask adb.exe from Background processes (TaskManager) and Run Application again.
It works for me
I'm newly configured Android Eclipse neon in Ubuntu. When I try to open the eclipse it throws error As
"Failed to get the required ADT version number from the SDK. The Android Development Toolkit may not work properly"
I have tried many references but i am unable to solve the issue as given in references to reinstall ADT plugin.Which i have tried many times and does not solve the issue.
The Message shown in dialog box
Finally i got an answer.
You first restart your eclipse and check it.
If again throws same error please try this steps:
1. Download latest SDK tools package package from google.Download here end of the page.
2. Extract the tools package.
3. Replace Exract folder(ToolsPackage) to ANDROID_SDK_DIRECTORY/tools folder.
4. Now fixed the issue. works fine for me.
What I did was download the SDK TOOLS folder from the url:
https://androidsdkmanager.azurewebsites.net/SDKTools (Android SDK Tools 26.0.2)
then find the path where the SDK is installed
MAC OS: open //Library/Android/sdk/
and overwrite folder tools
After updating Android Studio to version 2.2 (on Windows 10) and somehow next morning I received such error when gradle built on any project:
Write access is allowed from event dispatch thread only
Despite that gradlew -build command worked and completed successfully.
I tried typical Android dev's of WTF repairing set: clean build, invalidate caches, removing build folders, removing .gradle folder, tried different gradle settings, even reinstalling Android Studio and nothing helped.
I've created this question only to share my experience with community, because I wasted two hours on it.
So the problem was concluded in that Android Studio conflicted with my installed JDK version, so it was resolved when I checked JDK location (File → Project Structure → SDK Location), ticked 'Use embedded JDK' checkbox and set JDK location to 'path to Android Studio'\Android Studio\jre
Problem was occurred when android studio conflict with installed jdk
version, Go to the (File -> Project Structure -> SDK Location), check
'Use embedded JDK' checkbox and set jdk location to 'path to android
studio'\Android Studio\jre :) Simple
that didn't work for me, i ran a 'gradle clean build' command, i figured out that there's a conflict in a line in the gradle, deleted it and sync project (as in this pic)
My issue was that I had removed the SDK I was using while clearing up hard drive space.
To fix this, first check what SDKs you have installed, or install one in Tools > SDK Manager.
You can then change the compileSdkVersion and targetSdkVersion in app build.gradle to your installed sdk version.
Otherwise you can just reinstall what ever sdk you were using.
In Android Studio 3.2.1 go to File -> Project Structure -> SDK Location and check in the check box "Use embedded JDK (recommended)".
I'm trying to update my ADT to new version 23 so I found guides like this to perform the update:
Got to "Help > Install New Software"
List item
Click on "What is already installed?"
Remove any existing components that you wish to replace/update.
Once done, either install the new updated via the ADT url or download the zip and install from that .
But when I click on "What is already installed?" and try to unistall version 22 of ADT I get this error:
I'm really confused! Details say it cant remove eclipse.exe but if it remove it then my whole eclipse goes! Any help would be appreciated.
I solved my problem so describe here what I did maybe it save someone else!
1- to get rid of this error
disable your antivirus protection
make sure that your os user has full permisions for writing and deleting files
be sure your eclipse folder is in c:\
run eclipse as administrator
2- after this you can use the instructions I mentioned at my question to install newer version of ADT but remember don't restart eclipse after unistalling older version! even if eclipse says you must restart to changes take effect don't do that! it simply removes eclipse.exe so you don't have any exe file to start your eclipse again! So without restarting eclipse after unistalling older version of ADT plugin use ADT url and install newer version.
3- enjoy!
All project worked fine
But suddenly
This problem occurs all project...
I can not run all project.
This occurs after the recent update for the Eclipse Plugin(s) for Android. In Eclipse, use Window -> Android SDK Manager, and update your Android SDK Installation. The error message will disappear when you restart eclipse.
Or, if you're like me and have both Eclipse 3.7.x and Eclipse 4.2.x installed, you will need to update the Android SDK Installation on both of them if you want both of them to work (despite the fact that I used the same installation directory).
Updating the Android SDK install is something of a beast in and of itself; I was having some issues installing API 17, but I found that clearing the SDK Manager cache alleviated those problems.
I still had the issue following aanno's answer, so what I had to do after his step was to switch my workspace (File->Switch Workspace) to another folder, apply that and then immediately go back and re-select my original workspace location. Once I did that and eclipse returned, my workspace was back up and running.
The error appeared after an upgrade earlier today. There was no obvious difficulty with the upgrade.
After many partial measures, it took the following to get the error to go away:
deleting both the Tools and current Android API installation, using the Android SDK Manager (followed by reboot);
deleting the original directory in my filesystem containing the Android SDK files;
downloading a fresh version of the Android SDK files (http://developer.android.com/sdk/index.html) and specifying its location in filesystem to Eclipse in Preferences=>Android;
installing fresh versions of both the Tools and current Android API, using the Android SDK Manager (followed by reboot)
I wonder if there is something buggy in the regular updating protocol. If updates go wrong again, I will try this full uninstall and reinstall of the SDK files and ADT Plugin from the outset.
For the record:
Mac OS 10.8.2 on 11-inch MacBook Air, Late 2010
Eclipse Version: Juno Service Release 1
Build id: 20121004-1855
Android tools: 21.0.0.v201210310015-519525
Even reinstalling the Android Plugins for Eclipse didn't made this error go away for me.
For the record (aka what I've tried)
I've looked for a file called "find_java" in my SDK Folder but couldn't find any (OS X here). Solutions suggested by other answers modifying this file was not an option.
I've also uninstalled Eclipse Plugins (using Eclipse Juno) via About eclipse > Installation Details. Also I've tried to remove possible remaining files for this I removed these files/folders:
/path_to_eclipse/features/com.android.* (found 4 folders in total e.g. com.android.ide.eclipse.adt_16.0.1.v201112150204-238534)
/path_to_eclipse/plugins/com.android.(found 4 *.jar e.g. com.android.ide.eclipse.ddms_16.0.1.v201112150204-238534)
I then reinstalled the plugins from inside Eclipse via Help > Install New Software following the usual process.
Note: Starting the Android SDK Manager from within Eclipse I got informed my software is up to date!
Solution (?)
With installed Eclipse Plugins I downloaded the SDK from dev.android.com, unzipped to a nice location (near the beach of you ask me ^^) and referenced it from within Eclipse: Eclipse > Settings > Android > SDK Location.
It seems the dex.jar error moved away after this (consisstent even after restarting Eclipse).
However currently my open projects are Unable to resolve target 'android-XX' (X generic version number).
Once again I had a look in the Android SDK Manager and yup - now it's listing a lot of plugins as uninstalled so currently I'm re-installing the API for various Android level.
Will keep this post updated but it seems that downloading and manual referencing the SDK did the trick.