How to fix "Unable to locate adb" error in AVD Manager? - android-studio

I can not find any solution for this error when starting virtual device.
There are some similar topics here, I know, but it seems that none of them solves my issue.
I tried:
uninstall/install Android SDK Platform Tools in SDK Manager
add Platform Tools path to system PATH variable (windows)
set ANDROID_ADB_SERVER_PORT
download Platform Tools from https://developer.android.com/studio/releases/platform-tools and install it

For me extending my path helped.
%ANDROID_SDK%\emulator
%ANDROID_SDK%\platform-tools
%ANDROID_SDK%\tools
%ANDROID_SDK%\tools\bin
See https://stackoverflow.com/a/54030970/16364154

I just did this today
1>First of all disable fast restart from here
2>Then enable VT-x from here
3>Third go to your antivirus. If AVG, open the menu options and click quarantine.Else see where to find quaratine chestbox for your antivirus And then there should be something whose file name will be adb.exe. Yes, even if it it shows in the platform tools, there will be a file with file location Idead or something like that and restore it
4>Then go to your android studio and go to file in the top left corner. Click invalidate/caches and then Invalidate and Restart. Then try.
5> Also go to the sdk manager and update everything that isn't updated.
6>Should work\
If this does not work, just comment it and I will find a new way

Related

After stop inistallition in midway. How can I delete SDK tools and re-inistal it?

I am new at android studio. In SDK manager I just selected a lot of SDK tool and their versions by sellecting "show package details". Then I selected ok and install. There was too many package so my C:\ disc was nearly full and had no space to install rest of the package. So I stopped the installition midway .
My question is: How can I delete my old SDK tools? All seems not installed. In the progress it was above the 50 percent of installition so some should had been installed.
I am using these SDKs for Mobile Game made by Unity GameEngine, and I do no want to make a critical mistake(if it is critical).
After that I wish to re-inistall some only I need.
Edit:As I see there is a clickable Optimize disc space when I click It it says
It can delete these files without an issue.
.../SDK/.temp is ~10GB
.../SDK/.downloadintermediates is ~900MB
*Are all 10GB file is my not-inistalled packages.If so, is this the way I should go for this problem?

Location menu in extended controls of Android Studio virtual device

I need to import a .gpx file to my virtual device (something I'm attempting for the first time today), but I'm having a problem I can't find any reference to anywhere else. I'm either having a moment and missing something that should be obvious or there's an issue with the specific build I have that's causing an issue. I have Android Studio 3.5.3 installed and I've tried multiple different virtual devices.
All references to the menu page referenced in my title that I can find online look like this:
While my version of that page looks like this:
That "Import GPX/KML" button always appears to be greyed out. What am I missing here?
Eventually found the cause of this and a solution. The issue was caused by an Android emulator release that updated the Location settings to include a Google Maps based UI. Release notes here, though I've found the 29.2.11 release on 03/12 also contained the UI change: https://androidstudio.googleblog.com/2019/12/emulator-29212-stable-google-maps-ui.html. On my Windows 10 computers this also removed the option of importing a GPX file (not sure if this was an intentional choice by Google or a bug). Not sure if it will affect Linux or Mac users but I've observed the issue on multiple Windows 10 devices.
The fix I found for the issue was to downgrade my emulator to 29.2.1. That version can be found here:
http://dl.google.com/android/repository/emulator-darwin-5889189.zip
http://dl.google.com/android/repository/emulator-windows-5889189.zip
http://dl.google.com/android/repository/emulator-linux-5889189.zip
In Windows, next go to C:\Users[username]\AppData\Local\Android\Sdk\emulator. Those of a cautious disposition can backup this folder, but either way the package.xml file will be needed and everything else can be moved or deleted. Edit the details in the XML to match the version number of the downloaded emulator. Copy the downloaded files to this location along with the package.xml. Then just make sure not to download the update again when Android Studio is opened.

Flutter App Running Error: Dart can not be opened, Developer can not be verified after upgrading to Catalina

I was using the latest version of Android Studio IDE for creating flutter apps. But when I upgraded from Mojave to Catalina and tried to open my flutter code on IDE it gave me an error saying:
Dart can not be opened because the Developer can not be verified
What is the reason behind the error and how can I solve the issue?
Do I have to install flutter and relative development tools from scratch again or is there any other way to resolve the issue?
Do this steps and repeat until allow all you need and stop notifications.
Solve for me.
On your Mac, choose Apple menu > System Preferences, click
Security & Privacy, then click General.
Click the lock icon to unlock it, then enter an administrator
name and password.
Select the sources from which you’ll allow software to be
installed: There should be a button that says "Allow anyway". If not
make sure you've cancelled the error dialog.
usually you will not be allowed to install the applications dowloaded form other sources .... you need to first give permissions in the system Preferences
apple-icon on left top corner > System Preferences > click Security & Privacy > then click General... now Click the lock icon to unlock it ...
2.now, you will be shown with below attached image ... click allow anyway ..
now retry installing ... you are good to go...
Disabling entire Gate Keeper is definitely not a good idea as it will result running any type of program on your system.
You can add Dart to the white list by running this in terminal:
sudo spctl --add "Path_to_flutter/bin/cache/dart-sdk/bin/dart"
You might require to reboot the system in order to apply the changes.
There are several other binaries other than Dart that may get blocked as well.
You can run GateKeeper script to fix the issue:
https://github.com/AmirKamali/Flutter_GateKeeper_Fix
I have published an article with more information how to fix this:
https://medium.com/#amir.n3t/how-to-fix-flutter-idevice-id-running-errors-in-mac-osx-catalina-7aa1f89f61aa
You can run this command to allow your mac/apps downloaded from anywhere
sudo spctl --master-disable
So who the hell is an "identified developer" if Google chooses not to be one? Something is wrong with this
i updated mac to Big sur and then got this problem.
Allowing dart in the security and privacy settings and then Deleting ...flutter/bin/cache folder solved it for me.
run flutter doctor in terminal afterwards to reinstall dart SDK
This issue can be resolved by deleting the artefacts directory and running flutter doctor once again - More Info Here
2022 update
The button is now at
 → System Settings → Privacy & Security → Scroll down to Security → Allow anyway

No Android SDK found SDK tools directory missing

Basically I just installed for the first time in my life Android Studio android-studio-ide-182.5264788-windows.exe and when I open it I get:
Missing SDK, No Android found SDK found
I also checked this path: C:\Users\<user>\AppData\Local but I have not found and Android folder there because I was looking for C:\Users\<user>\AppData\Local\Android\Sdk
If I press next next finish I get:
Nothing to do!
Android SDK is up to date.
SDK tools directory is missing
I have also checked all kind of solutions posted on the internet but none of them fixed my problem.
I figured it out meanwhile but I forgot to update the question. Basically I had those issues because of the corporate proxy which was blocking some resources when installation was in progress.
The solution for me was to configure the proxy inside Android Studio under System Settings > HTTP Proxy. I have set it to Manual proxy configuration.
Besides this I also had to configure some security certificate inside the Java Version which was used by Android Studio. I used this code to do that: https://knowledge.digicert.com/solution/SO4085.html
The last thing was to run this: sdkmanager --licenses. I tried first in cmd but it was not working, I don't know for what reason but after I tried in Idea it worked.
After all of these, it worked. I had a small issue with the .. but it got fixed after I went in Setings > Build, Execution, Deployment > Instant Run and disabled Instant Run.
Download the zip file: http://dl.google.com/android/android-sdk_r24.4.1-windows.zip
Unzip it to SDK directory, and files like this:
D:\Android_sdk\platforms
D:\Android_sdk\tools
D:\Android_sdk\SDK Manager.exe
D:\Android_sdk\SDK Readme.txt
Restart Adnroid Studio, Configure->SDK Manager
Then you can change the Android SDK Location to your SDK path
After installation Click on configuration Go to SDK manager -> SDK tools and
uncheck “Hide Obsolete Packages”
Refer the image
after that check the mentioned package and install it –
C:\Users..\AppData\Local\Android\Sdk\tools\bin is created or not.
After creating project
Go to Tools
AVD manager
Your virtual device -> Create virtual device
Select Hardware :- Nexus 5x (Resolution)
Next
Check the latest or download latest one (OS)
Next
As it is default settings
Launch Virtual device
network adapter ipv4 settings or proxy.. I checked that, then it solved.

Android Studio 2.2.1 - Windows 7 Ultimate 32-bit

I am new here so I would like to apologise if I do/say anything wrong firstly. I have Googled this issue and searched Stack Overflow for it as well but it was not the exact problem which I am having.
I am currently doing Rob Percivals Android N Developer course on Udemy.com . In the course they recommend that you work in Android Studio 2.2.1 (which they generously provide a download link for).
I installed this on my machine and immediately I encountered a JDK/JRE issue which I solved through a quick Google. Then when it came time for me to create a new project, a whole new problem appeared.
Here is what I am doing (I'm sure if you're reading this you are 100% familar with Anroid Studio and don't need screenshots hence why I didn't provide any):
Create new project
I am choosing "Phone and Tablet Only" with and API 15
I am checking on "Generate new layout file" and "Backwards Compatibilty"
Finish
Now immediately. an error message pops-up "Grade 'xxxxx' project refresh failed. Unable to start the daemon ... object heap"
The solution proposed on Stack Overflow was to go into the "gradle.properties" file and change "-Xmx1536m" to "-Xmx1024m" and then close and open Android Studio. While this works, my question is do I have to do this every time I start a new project? Is there no permanent fix here?
I have read through all other suggestions such as deleting the .gradle folder in my Users folder and File Menu - > Invalidate Caches/ Restart->Invalidate and Restart but none of them works for me.
I would appreciate any responses.
Answer 1 :
Steps to solve problem in android studio
Click on file and select a other setting from dropdown menu and then select default setting.
Select build,Execution,Deployment option.
Select Compiler
Here add a following line in Additional build process VM option
-Xmx3072m -XX:MaxPermSize=524m
Check This Image
Answer 2 :
Try deleting your .gradle from C:\Users\<username> directory and try again

Resources