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.
Related
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.
I installed Android Studio 3.0.1 and everything seemed to go as expected. When first starting up, I got to the point of downloading the SDK components, and received the following error.
"Android Support Repository, Android SDK Tools and 7 more SDK components were not installed"
Has anybody every seen this? Any ideas or suggestions are greatly appreciated.
I am using Windows 10 64 bit. I was able to capture some more details of the failure.
"java.nio.file.AccessDeniedException: C:\Users\gcleveland\Documents\Android\SDK2\extras\android\m2repository.backup.installer.installData -> C:\Users\gcleveland\Documents\Android\SDK2\extras\android\m2repository.installer.installData Warning: Failed to move original content of C:\Users\gcleveland\Documents\Android\SDK2\extras\android\m2repository back into place! It should be available at C:\Users\gcleveland\Documents\Android\SDK2\extras\android\m2repository.backup"
There are multiple other instances like this but different directories.
It is almost as if my permissions are not correct. I have full administrative rights and run android studio as an administrator.
I ran into similar issues with the exe file version and resolved them by instead downloading and installing the zip version of Android Studio 3.0.1 for Windows 10 (https://dl.google.com/dl/android/studio/ide-zips/3.0.1.0/android-studio-ide-171.4443003-windows.zip). After unzipping this file, I simply executed its bin/studio64.exe. I also switched my networking connection to NOT need a proxy, which may also have helped to resolve the issue.
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)
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...
I am running windows 7, and am trying to configure android to work in titanium...
I have installed both 32 and 64 bit versions of Java... (android didn't seem to work with the 64 bit version)...
When you go to configure android from within titanium I am getting the following error...
Items required:
•Add-Ons Google APIs 7, Google APIs 8
When you then click install or update Android, Android SDK manager opens and selects what I need to install... I click accept and it downloads and installs...
However once that completes, I still have the same error when going back to titanium...
It should not be this hard... Any ideas?
I've had issues with the 64bit version. Have you tried uninstalling the 64bit versions of Java?
Also, have you run Android to update all the libraires?
I know it's an old question but in case anyone googles it like I have, this is what helped me:
make sure to install Google APIs at least for the latest Android SDK that you have installed
make sure to have Android 2.3.x installed. This is critical, Titanium Studio somehow couldn't link to my Android SDK (set outside titanium folder) even though I had half a dozen higher than 2.3 SDKs installed
restart Titanium Studio
Further more, in case this doesn't help, try clean-starting Titanium Studio, like so:
close Titanium Studio
go to your Titanium Studio installation folder (e.g. "C:\Program Files\Titanium Studio")
open TitaniumStudio.ini
copy these two lines at the beginning of the file:
-clean
true
save file and start Titanium Studio.
After succesfull operation you can remove those two lines from .ini file as they are not needed.