Android Studio runs multiple already-deleted devices when running the AVD - android

when I run my AVD from Android Studio it also runs devices I already deleted in the past. It also sets an "IDE error accurred" message.
I tried deleting *.lock's, setting a new device, re-installing the IDE, using other versions and many more things but nothing seems to work on my issue.
Any idea how to solve it?
I can't post images so here's a link of the problem
List of AVD's from command line

UPDATE
So I was able to fix that if anyone would ever need.
I deleted the device i was using.
I closed the Android Studio.
I deleted the .android folder completely.
I opened the Android Studio and created a new device. (don't run yet)
I went to Settings > Tools > Emulator and set off 'Launch in a tool window'.
Now everything works just fine.

Related

Android Studio stuck on loading devices

I'm currently running Android Studio Bumblebee 2021.1.1 in windows 10.
The problem I have is each time I start android studio the device list is stuck in loading devices.
I tried these solutions
android studio device list stuck on loading/51101178
android device list showing in android studio got stuck/65177069
The soulutions provided in the threads sometimes work and sometimes don't but the real problem is even if I did fix it in the run time, The next time I open android studio it's still there.
I already tried updating android studio to latest version, reinstalling android studio, deleting all the caches and plugins and resetting it to default. Completely Deleting Sdk folder and downloading again. But nothing helped I don't know where this problem could be originate from
In my case deleting the "platform-tools" folder as Dyenal said didn't work because it said that the folder was open elsewhere (even when I had shut down android studio). If that's your case too, do this.
Close android studio
Go to your task manager
Go to the "Details" tab and look for "adb.exe" as seen in the image below.
Right-click on it and "End task".
Open android studio and pretend you weren't interrupted. Cheers :)
Go to SDK folder delete platform-tools folder.. invalidate and restart the studio..works for me!
After hours of research and try and error I finally figured out what was going on.
Turns out my adb configuration was conflicting with genymotion's. Nothing could have done at the side of android studio. I went to the genymotion settings ADB tab and changed from Use Genymotion Android Tools to Use custom Android SDK Tools and it went away at last
This is a temporary solution. Open terminal and type adb devices. Once your device starts showing up in terminal, it will start showing up in loading devices too.
This problem occurs due to Windows folder accessing especially when you change the AVD folder.
Windows prevent access to Windows partition root. you have multi options for solving this problem.
Move AVD folder to another driver. Then define it on the Environment variable
Move the AVD to C:\Users\<User>\.android\avd folder. this folder is accessible for Android studio.
Run emulator from device manager, then type adb devices in cmd prompt
Restarting my computer fixed the problem for me
When using Android Studio, or any other IDE which use their own ADB, it is necessary to set Genymotion to use the correct ADB instead of its inbuilt one. It is documented here: https://docs.genymotion.com/desktop/02_Application/#use-third-party-adbsdk
I only opened task manager and there were a bunch of adb.exe open so i ended all of them while android studio is running in the background so then adb.exe started again and then i go to android studio and find out that the issue was resolved.

Can't start Android Studio (when it already worked a lot of times)

When I wanted to start working on my app again in Android Studio I had this problem that Android Studio would start, but doesn't show a screen. In my Windows 10 taskbar I can see that it runs: Android Studio is running. But it doesn't show a window and it isn't on any other desktop. When I Windows+Tab or Alt+Tab it shows just a white screen for Android Studio. I tried restarting Android Studio, restarting my computer, reinstalling Android Studio and none of these worked this time. Yesterday it worked just fine. I had this problem last week too, but reinstalling worked. Does anybody have any idea what's wrong?
I got the same problem when I Upgrade to 4.0.
Reinstalling application is a waste of time, and it may not work.
You can try to delete the configuration file, its directory is named .AndroidStudio[version] and it is located by default on win10:
C:\Users\[userName]\.AndroidStudio[version]
This operation can make it work successfully on my win10.
Hopefully it helped you.
As stated before,
You can try to delete the configuration file, its directory is named .AndroidStudio[version] and it is located by default on win10:
C:\Users[userName].AndroidStudio[version]
Doing this will probally work, but it will erase all your configurations of the IDE, I learned that if you delete only the file named recentProjects found in C:\Users\[userName]\.AndroidStudio[version]\config\options it works.

Eclipse Android error when building dx.jar and traceview.bat

I know there are a multitude of questions across various forums that touch on this issue but nothing has helped thus far.
I use Eclipse Photon for my IDE.
I installed the Android SDK via Android Studio.
I recently moved to a new machine and since then I get these errors when trying to build the project. Actually, the first image occurs when I first open Eclipse. The second image is what I see when building (I cleaned beforehand).
Many solutions suggest reinstalling platform tools/build tools/the entire SDK etc.
So, I did this:
1) Closed down Eclipse
2) Opened Android Studio and went to SDK Manager
3) Unchecked and uninstalled all the options highlighted in the images below.
4) Once uninstalled I restart Android Studio and reinstalled all of them.
5) The errors noted at the start of this post persist.
Any ideas what I can try next? It seems every machine move/upgrade causes build issues. It's the main reason I dislike coding for phones, it's not the coding, it's the dev environments!

android studio - emulator doesn't work and genymotion doesn't get recognized

I'm building an app in Android Studio (beta) 0.8.9, though I can't seem to get emulators running. I've made a Nexus 4 and 5 emulator through the options, but I can't seem to get them started. It shows this in the Run App tab.
Waiting for device.
"C:\Program Files (x86)\Android\android-studio\sdk\tools\emulator.exe" -avd smallEmulator -netspeed full -netdelay none
So either it's not starting up, or I'm just an impatient SOB.
I've also downloaded Genymotion and started up an emulator through that, but now Android Studio doesn't recognize the emulator anymore. I try to run my app and check for any running devices, but it doesn't show up, despite the fact that it actually is running.
I've added the Genymotion plug-in, to no avail. No idea what went wrong.
I also have a One Plus One, which I'm not sure how I can debug on that. They don't seem to have drivers for that and haven't immediatly found anything on Google so far.
Any help would be much appreciated.
EDIT: I fixed my problem. I used Genymotion to fix the problem. The running emulator wasn't turning up, because the android SDK's weren't linked to one another. Genymotion and Android Studio used different ones. So I edited Genymotion's settings to use the same one of AS and now it works!
First of all, update android studio. Check if the emulators run from the AVD manager outside Android Studio, I mean by starting it up manually from ur SDK installation folder (AVD Manager.exe) . Check the path of ur emulator in .ini file in C:>Users>user-name >.android>avd. U can make a system variable for ur SDK folder "ANDROID_SDK_HOME" and place the .android folder's content there (the whole .android folder). Sometimes "resetting the adb" after u run emulator may work.
There may be an easier fix than what was previously mentioned. Try opening Android Studio, go to File, Settings, plugins. Select the “Browse Repositories” button at the bottom of the page. Scroll down the displayed page to find “Genymotion”; select it and install it.
When it has installed, restart Android Studio. Again, go to File, Settings, then go to Other Settings. Genymotion should show up as an option. There will be a field that asks for the path to the Genymotion folder.
Mine was: C:\Program Files\Genymobile\Genymotion. At any rate, enter the path, click Apply or OK and Android Studio should recognize Genymotion (You may need to restart AS once again). Now you should have a small red icon on Android Studios tool bar; when you hover over it a pop up that identifies it as “Genymotion Device Manager”. Click on it, select a device to load, click start and allow the virtual device to start completely. Now run your Android Studio project; the Android Studio “Device Chooser” will pop up. You should see the Genymotion device you’d started previously, select it and you’re good.
Hope this helps…

Android app layout not updated unless I restart eclipse

Im Very new to android development.
Im following this guide: http://www.vogella.de/articles/Android/article.html#overview
for some reason, any change in my application is not reflected unless i restart eclipse.
It doesnt matter if i uninstall the app using ADB, the emulator itselt.
I clicked "refresh" and run numerous times but not avail.
I completely changed the layout everytime but I had to restart eclipse itself (not the adt) in order for it to reflect changes.
Am I missing something here? thanks.
Eclipse 3.6.2 on Windows7 64bit
Right click on the project name in Eclipse, select Run As.., Android Application. Then you should see a pop up window showing the running Emulators. Select one from the list, and click Ok.
Also make sure your app doesn't have any compile errors, as that could definitley screw things up.
After trying to run, check the Eclipse console and it should say "Uploading yourapp.apk to Device..." or something. And it should launch the app on the Emulator. Look for any errors in the Console as well.
I had the same problem and worked around by changing or removing android:id attribute of a root element (typically viewgroup). I have Eclipse SDK 3.7.0 running Win7 64bit
Hope this helps

Categories

Resources