Why does Eclipse open an new emulator while there is already an emulator opened ?
Sometime it happens, sometime it's not. Does someone knows why ? I hate when it doesn't that and i would like to fix this "problem"
This is caused when your project properties are not setup to run manually and for whatever reason (SDK or Target version) the emulator opens in a new instance.
To Solve: Right Click your Project --> Run As --> Run Configurations
Then, make sure the Project in question is the one selected on the left and the Name is on the top.
You will then see 'Target' at the top:
Choosing Manual should allow you to choose the running emulator. If not, make sure your project SDK is set with an SDK version you have installed or a range that is compliant:
<uses-sdk android:minSdkVersion="3" />
<uses-sdk android:targetSdkVersion="14" />
or whatever range you plan on supporting and AVDs/Emulators you have setup.
Hope that helps!
Yeah, it's annoying. I don't know how to fix it per se either, but instead I set it to always let me manually select the device to debug on. Then at least you can choose the correct device/emulator. Right click your project, select Run, Run configurations..., then select the Target tab. Change the Deployment Target Selection Mode to manual. Automatic with a selected device is supposed to work, but I find once in a while it'll launch something else. If that's not set you can try that and see if it works for you.
its according to your project.
if you are running normal AVD and you are trying to run google api project then it will automatically open the google avd that its suits.
and also your api level.
if your project is 2.3 and you are running android 2.1 API then its will try to open 2.3 avd from your AVD list.
Usually this happens because of two things:
adb crashed
Yeah that happens, adb crashes in some way and loses track of devices/emulators. In this case close the second emulator and restart adb, e.g. via the ddms app or on the command line by using adb kill-server followed by adb start-server. Then relaunch and it should be fine.
You try to launch an app with a higher/different api than the emulator
If you run a 3.0 app and you have an 2.3. emulator open, the plugin will start a higher api level emulator for you. Or if you need the Google APIs and the emulator doesn't have them, the same thing will happen. Sometimes you get a dialog to select what you'd like to do, but not always. Not sure when that happens exactly actually.
I have faced this annoying thing many times, it happens occasionally. and I think I know the way to correct it. I think what happens is that the adb's connection with the emulator breaks or becomes faulty, so android launches a new emulator although you have already an existing emulator for the same platform running. To correct this problem.
Go to DDMS-->Devices Tab-->Click the option "Reset adb" (which is the last option) .
You will then see some error report in the console, but after a minute your emulator would be ready to be used without problems. I do it all the time and it works.
Related
First of all, I know that the title is similar to the other questions that asked here, but my problem is a bit different, and I couldn't find a solution.
The thing is, I've created an emulator and used it with no problem, but after I entered a Gmail account to the emulator, set the PIN for lockscreen and turned the emulator off after using it for a while, I can't turn it on back. It is stuck on black screen and after some time, it gives
"Timed out after 300 seconds waiting for emulator to come online"
error.
I know that wiping data solves the problem, but I don't want to wipe data because I don't want to enter an account and do the same process again and again. My other emulators are working fine because they have no Gmail account.
(Android Studio Dolphin 2021.3.1 Patch 1 running on Windows 11 22H2)
Things that I have tried:
1- Wipe data (it works but I don't want to do the entire process again, I need that account)
2- Change Graphics settings from Automatic to Software (didn't work)
3- Delete *.lock files in avd folder (didn't work)
4- Update emulator (I'm using the latest version and I believe maybe it's because of the update)
5- Update Android Studio (using the latest version)
6- Use the power button (not working)
7- Invalidate cached (not working)
this what solved my problem.
try the following steps:
Make sure that you have administrator privileges on your computer. Navigate to the directory "C:\Users\username.android" Right-click on the this file folder, and choose "Properties." In the Properties window, go to the "Security" tab. Check if your user account has the necessary permissions to access the file. If not, click "Edit" and give yourself full control. Try restarting ADB and see if the issue is resolved.
I hope this will work.
I just installed Android Studio, and I am very new with this program.
So when I run the Android Emulator it says: "To Start Android, enter your password", although I have never set a password. When I just enter a word with 4 letters it says "The Password you entered is correct, but unfortunately your data is corrupt".
After that, I have to Reset the Phone, but when I do that the same menu with "To Start Android, enter your password" appears.
Maybe it is just an easy mistake, but as I said I am new with this. I also did some research on the internet but I did not find anything useful.
this is the 2 images that it showe me:
1)
2)
and after i clicked on reset phone, nothing happened.
I would be very glad if someone has an answer for this.
This is a late response, but thought this simple fix might help anyone else who comes across this problem in the future. What worked for me is the following:
In VS2017 ==> Tools ==> Android ==> Select: Android Device Manager
In the Android Device Manager window, you'll see your Android Emulator.
Make sure the far right column contains the button "Start" (if "Stop" appears, click "Stop")
Right Click the device, and select the "Factory Reset" option in the menu.
Your emulator should now be working. Good luck.
open AVD and right click on the emulator choose ->Wipe data option.
Check that your avd folder path doesn't include national symbols (in my case it looked like C:\Users\Пользователь\.android).
After I changed this path everything is working.
See this post of how to change path:
Possible to change where Android Virtual Devices are saved?
Check out "Viewing and managing your Avds" part. Try wiping data of your emulator or create a new emulator for yourself.
https://developer.android.com/studio/run/managing-avds.html
enable GoogleAPIs and Google Play Store
Change the Android version. I was creating an emulator with Oreo 8.1 and got stuck in with the same issue.
I created another with Marshmallows 6.0 and no more asking for password.
Then if you are using Oreo 8.1 try with antoher.
I created a virtual device, and after, I had to reinstall the emulator.
When I booted the virtual device, I got this issue.
I deleted it and made a new one, and it worked fine.
Just go the AVD Manager and Wipe Data. The problem will be solved.
Here are the steps I followed after my device corrupted.
Close your emulator
Open AVD manager, right click on your device and click "Cold Boot Now" button.
Sorry for a very Late Answer. But you can't create a x64 Virtual Device on x64 System. Your device needs to be x86.
Just a warning to anyone getting this error on an emulator instance that was working and you cold booted or something. I got this error and just stopped and cold booted again and it was gone! So try that first before wiping your emulator instance unnecessarily.
Deleted the device in the Device Manager and created a new one with a higher OS version (Oreo -> Pie). The error disappeared. Did not find the real reason yet.
I am facing this problem from many day,i searched a lot but not found any convenient answer.
Whenever I start a emulator ,after some time when I see DDMS its show the emulator online but its File Explorer is show nothing . Its visible again when I restart my emulator again or restart Eclipse .but I dont want this ,I want a quick solution.
One more thing I have already set the device timeout to a higher value but its also not working. Here is Screen Shot of my DDMS .Can anyone have a Quick Solution.Thanks in advance.
I see that the question was posted back in 2013 so there was probably some other problem at play then... but for those seeing this problem today it's probably because of an issue with Emulators targeting Android 24 or 25. Currently it appears that the Android Device Monitor is not able to display the file contents for Emulators targeting Android 24 or 25. It is however able to show file contents for Emulators targeting Android 23. Try launching an Emulator targeting Android 23 and you should see the Emulator's file contents in the File Explorer tab as expected.
I've created an Android bug report here.
Edit: a couple more bug reports about this here and here.
from command prompt move to \sdk\platform-tools\
and type
adb kill-server
and then
adb start-server
I fixed it by the following steps: 1. Open windows task manager and kill adb.exe process. 2. Close eclipse and restart it. Then it works.
Hope it helps.
But i cant understand about online emulators. Do you mean virtual devices ?
What you have to do is first launch the emulator ,then go the Window->show view -> other -> Android -> devices.Then you will be able to select the device that is online,now go the file explorer,which which will show all the files related to that specific device.Another point need to be noted here is ,the files in the file explorer varies from device to device
You have to keep the device selected in the devices view.
My problem:
I ran upon an awkward problem as I was developing my application. As mentioned in the title, every time I install my application (in run mode, not debug!) at start-up the waiting for debugger to connect.. message appears for 1-2-3 seconds, and the application starts.
What I want:
What I would like is to be able to start the application without that message appearing (it only started appearing in the last few days, and I can't remember changing anything related to debugging).
What I've tried:
I have tried setting the android:debuggable="false" but if I do this the debugger never attaches and the message never disappears.
I have also tried after installing to disable USB Debugging, but still no results.
Even if I kill the application and wake it up through an external source (it uses Google's C2D Messaging Framework) it still tries to run in debug mode on wake-up.
I have developed several Android applications and never stumbled upon this. Why wouldn't I be able to start the application in RUN mode? Is there any other way to install the application on the device, without hitting the run button in Eclipse?
I can post code-snippets from the AndroidManifest or from other parts of the code if necessary, but as I already mentioned I wasn't getting this kind of weird behavior several days ago.
Make sure your java files dont have any break point and Restart the device every thing should be normal.
I was experience the same problems where my application was always being run in debug mode. Restarting the device did the trick for me.
and make sure you are using
right click on project-->>Run As -->> Android Application
For me the solution was turning off the USB debugging from my device settings, and then turning it on again!
Much quicker than restart the whole device.
I had the same problem using Android Studio. Restarting my cellphone worked for me!
1. Open setting in ur phone.
2. Go to developer options.(About Phone-> Developer Option).
3. Disable the Developer option and again enable the Developer Option.
4. Enable USB debugging and Install via USB.
Run this command and the issue will be resolved
adb shell am clear-debug-app
Check if the option waiting for debugger is actived.
Settings -> Developer options -> Wait for debugger.
I think this it is new from Jelly Bean.
I'm assuming this is in the emulator and not on a device. If it is a device, ignore the rest. :p
It sounds like you saved a snapshot of the emulator as the debugger was connecting.
To fix:
1) Go to the AVD control panel, click on the emulator that's affected and hit start
2) when the window pops up, de-select "Launch from snapshot" and leave "Save to Snapshot" selected
3) Start the emulator.
4) Close the emulator
5) On the AVD control panel again start the emulator
6) Check "Launch from snapshot" again
That should fix things up.
EDIT.
Sorry for the wasted space, I read too fast and missed you talking about trying disabling USB Debugging. I have run into the above situation I describe before so I'll leave this answer posted for those who come along who do have such an issue.
"Wait for debugger"in Developer options may have been set to wait your application.
Do check once that you placed breakpoints. Run app once and if you get the same message do debug as-> debug configuration-> select the app which you need to run and select always prompt to pick device.It will work for sure. It may be stupid, but i faced this problem for a long time and i tried this and this helped me. And if needed restart your device. Thanks
For me, I use Android Studio 2.1.2I, I click on Menu Run > Attach debugger to Android process
There is only 2 lines
__device_name
____app_name
I just select app_name(want to run) and click OK then miracle happens.
I had the same problem.
But restart my Device or clear the Breakpoints don't worked.
I tried :
Run --> Attach to Android Process.
Select your package and press OK.
and it works :)
There was so many adb processes running ,I kill them all and its start debugging
You can also set your Android App as Debugging-App
Settings --> Developer Options --> set Debuging-App
there you can choice your app
You might have added your app in Select app to be debugged on your phone. In Settings -> Developer Options -> Select app to be debugged
To resolve this, go to Select app to be debugged and click on No apps
Your manifest file may contain following permission
Just remove this permission
<uses-permission android:name="android.permission.SET_DEBUG_APP"/>
I have installed Mono for Android setup, I was able to follow through the Hello World example, I have the Android SDK Manager working with my AVM's I can even start an emulator when prompted during deploy -> select device selection. Howerver, once the emulator starts it never shows in my Select Device list, so I can't really test anything by pushing it to the emulator.
Am I missing anything? Is there any other way to deploy a compiled package to android emulator when using VS2010/Mono setup?
Thanks a lot for your insight.
I had similar behaviours in Netbeans. Here is what I do:
After the emulator has started the first time, it is "locked". Just unlock it by dragging the green thingy from left to right. Then just press "RUN" again in the IDE.
Sometimes, it works to just hit "Run" again without changing anything. Just wait a minute after trying the first time.
I discovered that being patient with the emulator often helps :)
In my case, I had to be running VisualStudio as an admin in order to get the running emulators to appear in the list.