Android SDK Installed, but adb.exe Missing - android

After my Visual Studio install suddenly lost the ability to deploy my Xamarin app to an android emulator, I decided to uninstall EVERYTHING (Visual Studio, Xamarin, Android SDK) and start over.
Everything has been re-installed, but the Android SDK does not include the adb.exe file. The place where I expect to find it is here:
C:\Users\costcopc\AppData\Local\Android\android-sdk\platform-tools\adb.exe
What went wrong? How can I fix this?
I opened a cmd.exe prompt and searched the entire drive (C:>) to find the file - it doesn't exist.
Re-Tracing My Steps
In case it helps, I will retrace my steps...
Uninstalling
I un-installed Xamarin first, according to instructions. I wanted a blank slate so, per those instructions, I also uninstalled:
Android SDK Tools
GTK#
I did not uninstall the Java SDK because, as my very first link explained, I had already used a system restore point to recover a stable version of the Java SDK.
Next up was Visual Studio. I used its installer for the uninstallation, and then I followed the post-uninstall "Secondary installer" instructions it gave.
Re-Installing
I re-installed VS 2015 first, then I launched the Xamarin Studio installer, which in turn installed the Android SDK for me:
With everything seemingly installed successfully, I launched Visual Studio and tried to open the Android SDK Manager with Tools -> Android -> Android SDK Manager.
It worked, but I noticed that a cmd.exe window opened and remained opened, containing a couple strange error messages.
There it is: "The process cannot access the file because it is in use by another process."
Despite the anomalies, I did use the SDK manager to install 4 more packages.
Still, I was feeling uneasy about the error messages so I figured it was time to reboot. After the reboot the situation became worse. Before, Visual Studio was at least able to launch the android SDK manager. Now it was altogether unable to launch it:
That oddball SDK path C:\Users\costcopc\AppData\Local\Android\ANDROI-1 had disappeared!
Xamarin Studio was also unable to launch the SDK Manager:
Now I chose to execute a Xamarin Studio installation "repair." Xamarin acted like the Android SDK was installed, and so it did nothing to fix it.
Again, what can I do to fix this?

I solved this issue by selecting Tools/Xamarin Account in VS 2017RC.
Then the browser opens, go into your account and download and install Xamarin from here.

I'd recommend you installing VS 2015 community ISO from here:
https://go.microsoft.com/fwlink/?LinkId=615448&clcid=0x409
after installation, open VS > tools> options > Xamarin , and check that your
SDK is detected successfully:
If something is not detected, then run android SDK manager as administrator then make sure that the SDKs are installed/updated correctly.

just Run visual studio as administrator and it will be solved(map directory up to end folder where actual tool are residing)

Related

No uiautomatorviewer in android sdk

I am using ubuntu 19.04. I want to automate some actions of an android app, I download the android studio, edit PATH, run studio.sh file, it asks to download sdk, I go with 'standard' installation. It downloads and installs, evrything fine and I successfully run avd manager and virtual device, install the app and use it. No problem with appium as well. But here comes the problem, no matter which tutorial I follow, uiautomatorviewer is all over internet as the tool to find id of the elements on active screen. But, there is NO EXECUTABLE file of uiautomatorviewer in android-sdk/tools. I search in platform-tools/, it's not there and not in bin/ as well. So I recursively searched whole directory of android studio and android sdk but there is not executable name 'uiautomaor' or 'uiautomatorviewer'. There is a uiautomatorviewer.jar file but I am unable to run it with jave -jar command. I have searched through android studio docs for some recent update but an article update on 3 march 2020 mentions uiautomatorviewer. Please help!
I've spent over 4 days trying to find uiautomatorviewer in android sdk, have reinstalled and android sdk over 4 times, have trying downloading it from official site and extracting it, tried with snap, but just couldn't find a way around.
I managed to get UiAutomatorViewer by deleting android SDK, downloading Android Studio and installing SDK using Android Studio. It installed SDK manager and some packages among which was UiAutomator.

adb.exe keeps crashing, even after all Android components are reinstalled

I have a major issue with Android development on Windows 7. I was working with some Nativescript app for about a month, until Android studio performed some routine update, few days ago. Since then, i'm unable to get the environment running: Every time i open the Emulator, adb.exe "stops working" after the phone loads. I tried following the steps recommended here: How to completely uninstall Android Studio from windows(v10)?
No success. I reinstalled Android studio and android SDK multiple times. I tried also different emulator images- same result.
I will mention, that my SDK was installed initially using choco, as instructed in the Nativescript docs:
choco install android-sdk -y
Now, every time i want to reinstall it, i need to add the --force flag.
Bottom line: How can i completely reset my system to the state before any Android development environment was installed, in order to rectify this situation? Following the steps in the above link didn't help. There's probably something interfering.
Any ideas? I cant develop anything...
Had the same issue recently, adb.exe just started and kept crashing after installation of some updates offered by Android Studio.
What helped was manual re-installation of platform-tools, back to version 28.
So steps:
1) https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip - download previous version of platform tools;
2) navigate to %AppData%\..\Local\Android\Sdk\platform-tools;
3) replace all files inside this folder with files from zip archive of version 28 downloaded in step 1.
Other steps I've tried before: full re-installation of Android Studio, SDK, emulators and so on, but I believe the actual fix was reverting back to platform-tools version 28.
After that my emulators (API 28, Android 9.0) went back to life.

Android Studio SDK is missing

I had a USB connection problem when I debug and updated BIOS then, the laptop had problem with drive so, I needed to recover it. So, I recovered it with removing all the applications and just kept my personal files.
And I downloaded and installed Android Studio again, and SDK missing problem occurred like below:
I can't see 'SDK' when I install Android Studio from here. So, I can't select any.
I tried with SDK Manager. I can't install any versions with "Your Android SDK is missing, out of date, or corupted." error.
I tried Update. But nothing changed. (Updated to 3.3.1, but failed to Sync SDKs ERROR.)
Some people on Stack-overflow suggested to download SDK separately, but their links just show Android Studio installer, which I already installed. Maybe the links were so old.
"C:\Users\XXX\AppData\Local\Android\Sdk" does not exists.
I uninstalled Android Studio include User setting and reinstalled it.(There is no such thing that I can select previous version kind of thing.) But the result is the same.
TL;DR This is sometimes caused by Windows registry settings retained with the current AndroidStudio project. To fix, just startup Android Studio and then close the current project (File -> Close Project). If this was the problem, AS will now go into a long update and restart cycle to repair itself, but will end with success.
I also recommend that you then change AS settings to not open the last project on Startup (Settings -> System Settings -> Reopen projects on startup)
Windows 10, Android Studio v3.6 and v4.0.
This one drove me nuts! I had the same problem - my SDK seemed to be corrupt so I did a full Uninstall (v3.6) and Install (4.0) of Android Studio and when Android Studio started up I got the same message Android SDK is missing.
The SDK Manager in Tools wasn't working.
I went to the link and there was nothing to download the SDK. So I installed the file which looked a bit like the SDK, commandlinetools-win-6514223_latest.zip, unzipped, and then tried to use the missing SDK dialog to include it in AS, and no joy.
BUT - I noticed that after an uninstall and fresh install Android Studio still came up with the last project I was working on so I guessed it must be something in the windows registry (rather than AS settings). I closed that project and AS suddenly popped up a dialog to install the SDK!
After a big download and install, Android Studio returned with the SDK (and SDK manager) all functioning!
So - just startup Android Studio and then close the current project (File -> Close Project)!
How I did a complete re-install.
Uncheck the "Keep Settings" (or similar) option in the Uninstall dialog, but export your settings first (File -> Export Settings). I found it easy to: Export settings; Complete Uninstall; Download and Install; Import Settings;. But, or course, there were several massive downloads. Still don't know why the last open file came up after the fresh install. It's probably in the registry, so, if there are still problems then you'll have to clear AS from the registry as well. Which sounds painful.
If android sdk is deleted, go to :
SDK manager -> edit -> next ..
I solved this problem with connecting android-sdk folder in C drive.
I reinstalled my OS. But hopefully, I kept my personal folders. So, I could find that folder.
However, If you don't have SDK folder, you may need to install SDK by yourself.

How to resolve : unexpected error occured Initializing Android Designer" in VS 2015 with Xamarin

Bringing up a new PC with Xamarin and VS 2015 Pro I received the following error:
An unexpected error occurred trying to initialize Android Designer.
Please verify the Android SDK path and the Java Development Kit path
on Tools->Options->Xamarin->Android Settings menu. Please see the logs
for more details.
I verified the SDK's are installed correctly. VS didn't generate any kind of Activity Log so I believe the log must lie elsewhere. Anyone know where I can find this log to find out more about what is wrong ?
I had exactly the same problem described (on a new PC, with a new Visual Studio install) and am 99.9% sure the answer is in how updates are applied. Or, more importantly, how they aren't being applied when you think they are.
Go to Tools | Options | Xamarin | Other, and under Xamarin for Visual Studio Updates, Check now for STABLE updates. Make sure you're running at least 4.2.0.680. You will have to close Visual Studio in the background as the updater is running--it'll warn you. Uninstalling and installing the cross-platform development tools from Visual Studio was not applying this update for me. I had to force the issue.
Now, as mentioned earlier, go to Tools, Android SDK Manager. I noticed my "Android SDK Tools" and "Cross Platform Tools" were out of date and updates were available. I accepted and applied the updates to version 24.4.1. BEAR WITH ME, THIS IS WHERE IT GETS TRICKY--it still didn't work.
Go back to Tools, Android SDK Manager. I immediately noticed that even though I'd just applied the latest update for "Android SDK Tools", (24.4.1), a new version (25.2.2) was now available, along with 17 other updates. I accepted them all.
Bingo. Where I once had the annoying error message and an empty design surface and an empty toolbox with the sad "no usable controls" message, I now have the attached screen snapshot--a design surface where I can see a visual representation of my .axml, and a toolbox from which I can drag and drop controls and they actually show up on my Samsung tablet.
Sorry so verbose. I lost hours on this problem and thought others might appreciate another working solution.
I had a similar problem as explained below.
Here a solution that worked for me:
1) delete the one package appearing in the screen shot below.
Nota bene: At this stage VS 2015 greyed out the Android SDK manager buttons, even after a restart.
2) download installer_r24.4.1-windows.exe for windows https://developer.android.com/studio/index.html
3) launch the Android SDK Manager outside of VS and install the proposed 19 packages. This time I could go through the installation.
4) Launch VS 2015 and create Xamarin Android project. Launching Main.axml would launch the designer properly on an android project.
The bug I had
I had the same problem here on a fresh install of Win10 + Full visual studio community 2015 update 3 + .Net Core + Azure SDK and Xamarin. Creating a new project Xamarin Native (iOs + Androird) shows up the same message as mentioned by MikeJ. In addition, running in debug F5 makes the designer have a new popup
Problem seems to appear also here
https://bugzilla.xamarin.com/show_bug.cgi?id=44374
and here
https://forums.xamarin.com/discussion/77669/how-do-i-fix-this-error-the-installed-android-sdk-is-too-old-version-25-1-3-or-newer-is-required
.
Opening the Android Manager does not show up version 25 as an option, instead it shows this
However, we cannot install (greyed out button even by accepting license)
Updating Xamarin did not work neither How to update Xamarin for Android within Visual Studio Community 2015
Some guidance would be great to understand what happened.
I had the same problem (when bringing up a new PC with Xamarin) and after a few days I solved the problem.
I moved sdk directory from "C:\Program Files (x86)\Android\android-sdk" to "C:\android-sdk". Then I opened the sdk manager and made updates. It's all.
I think the problem is with the path, which has space :)
I was able to to fix the issue by opening the Android SDK Manager and updating all the tools to the latest version.
If you are already using Android Studio in your computer then this might solve your problem.
Check whether SDK is already available at some other location. That worked for me. To check SDK path- Open Android Studio-> Click on SDK Manager Icon. Check Android SDK Location. Copy that path.
In Visual Studio-- Open Tools->Options->Xamarin->Android Settings menu and replace the new SDK path. It will automatically ask to download the updates. Install all packages and you are done!
before you go through all that trouble (and I went through many convoluted steps myself for several hours) please try run your VisualStudio as administrator and see what happens!
It solved the above issue (and then some) for me. I used fresh WIN 10 and VS2015 Community install and I must have set some of my permissions to tight.
Also I learned that updating my NuGet package: Xamarin.Forms (v.2.3.3.168)
solved errors related to:
System.MissingMethodException: Method Android.Support.V4.Widget.DrawerLayout.AddDrawerListener not found.
But that is another issue all together.
Adding these two references to Droid.csproj and packages.config fixed the problem for me:
<package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
<package id="Xamarin.Android.Support.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" />
Another issue to be aware of is that you need to have Java Development Kit 8 referenced in Xamarin, instead of JDK 7. You can set this is Tools > Options > Xamarin > Android.

Android Studio Not Including SDK

I'm trying to setup Android Studio on a new install of Mac OS X Yosemite. I downloaded the Android Studio Beta v0.8.14 from here: https://developer.android.com/sdk/installing/studio.html and upon launching it complained about not having an SDK (although the download page indicates it should include the SDK). I tried searching after installing for the SDK and can't find it (a few other posts indicate /Applications/Android Studio.app/sdk but that location doesn't exist). Where is the SDK installed and what is required to set it up?
Go to the SDK Manager and click Edit... next to the field for the location of the SDK. Then an "SDK Setup" window should display. There you can download the SDK.
Edit: This answer is deprecated as Android Studio seems to bundle everything since a while already.
Old answer
It seems the android-studio-bundle version is no longer available in the download page (instead there are only android-studio-ide). When you start Android Studio, it won't let you create a new projet until you configure the SDK location.
That means you have to download the SDK separately here, extract it somewhere, and configure it on Configure->Project Defaults->Project Structure. After that, the SDK Manager icon will be enabled and you can download the tools you want.
I had the same problem on Windows. After I re-installed it a few times, I found that the SDK was installed but hidden in C:\Users\<user name>\AppData\Local\Android\sdk.
Information for Windows
For some reason, which I have no time to investigate, Android seems to provide, currently, the IDE and the SDK separately, while in the Dev Webpage says the opposite.
This is the "complete" (false!) tool I have just downloaded: android-studio-ide-171.4443003-windows.exe (SDK is missing here, note the "ide" in the file name).
And this is the real complete tool I had downloaded few months ago, from the same place...: android-studio-bundle-162.3871768-windows.exe
Note that this last one has the "bundle" in the file name.
Please, download the bundle (IDE+SDK) from here:
https://dl.google.com/dl/android/studio/install/2.3.1.0/android-studio-bundle-162.3871768-windows.exe?hl=ko
I want to suppose (¿?) that similar link you can find for Linux or macOS just Googling for it.
Hope this helps!
It worked like this for me
Downloaded the Android Studio
Install Android Studio
Open Android Studio after installation.
You will get a dialog box to import settings if you already have Intellij installed on your machine. Say "Do not Import". Otherwise continue to next step.
It will ask you in the dialog box to pre-configure such as theme, path etc.
Just click next next...and then Finish. You will see the SDK tool will start downloading.
After installation is finished. You can find it in this path: C:\Users\<user name>\AppData\Local\Android\sdk
If you have ever installed Android Studio before and then removed it, it won't reinstall the SDK automatically (speculation: some Windows setting somewhere).
The solution is starting Android Studio and then
File -> Manage IDE Settings -> Restore Default Settings
This will wipe any custom settings you don't have at this point and trigger the SDK install
What Pablo wrote is misleading.
This is the "complete" (false!) tool I have just downloaded:
android-studio-ide-171.4443003-windows.exe (SDK is missing here, note
the "ide" in the file name).
Yes, it is IDE only, but after you install this IDE and first time run it, SDK will be downloaded automatically. So there is no need to download some outdated bundles. Just use default "green button" on https://developer.android.com/studio/index.html
I'm using Ubuntu, and had previously installed Android Studio. It was using too much space, so I deleted it. Now when I downloaded it and started ./studio.sh, it found my previous installation configuration directory and asked to import from there. I did, and then this problem occurred.
I put the directory .Android Studio 3.3 in the trash and restarted ./studio.sh, and it imported the SDK automatically for me. That was good, because I couldn't find it where it was supposed to be according to the dialog box. The 3.3 above is from the version of Android Studio I was installing.
in my case, my country is forbidden from google, and my PC's time zone was set by my counrty.
after I change my timezone to another country my problem solved and android studio download SDK and nkd easily
Re-install studio. If ANDROID_HOME is set to custom location then it will install sdk there else it will install SDK in C:\Users<user name>\AppData\Local\Android\sdk
Note:this is a temporary fix
If you have Eclipse then you can use that SDK for emulation.
Just run the sdk manager and emulate a version of android. Then while you are asking for emulating something ie while running code it will show your emulator as online and you can even use it.
Hope this helps you.
All the Best...

Categories

Resources