Whenever I try to launch an Android app it will cause this error:
emulator-5554 disconnected! Cancelling
'com.hellos.ArithmaticCalculatorActivity activity launch'!
that is a known emulator bug. Do you happen to be running Ubuntu?
Try deleting and recreating your AVD. If you're still having problems, try the following:
Try launching in several ways: by starting the AVD first from your
list of AVDs, by right-clicking the project in your workspace, etc.
Click on Window-->Show View-->Other-->Devies, and click on the
launched device, highlighting it. There is a known issue that
sometimes robs your AVD of focus unless you do this.
Related
I have searched and tried a lot of methods.
One works for me is this command flutter run -d chrome --release.
What a pity that no debug info print out.
When i run it directly by pressing button in Android studio, my website showed nothing but white screen.
I got follow message from the Console
Launching lib\main.dart on Chrome in debug mode...
Syncing files to device Chrome...
I want to run it and get debug info. Who has good ideas?
Problem finally be solved, Firstly, Press F12 when you deploy your web to your Chrome browser. Then all debug info will be printed in Chrome Console. My problem is caused by
require.js:1959 Not allowed to load local resource: file:///E:/project/flutter_afast/lib/model/builder.dart
req.load # require.js:1959
Which caused by a import of absolute path(local path E:/...) in my dart file. Change this to relative path then work that problem out.
I can see the device list on VSCode in Windows.
And I can select any one.
And the emulator is opening.
But I can see a single message. "Waiting for a connection from Flutter.."
Application does not open.
It doesn't get any errors either. Waiting like this.
Make sure that your API level you're running your device on is the
same as what you have installed on Android Studio.
1.1 Click on the SDK Manager button around the top right corner of AS (The icon is a box with a down arrow next to it).
1.2 Choose the same API level as your device, (When I didn't do this I had a partial install and it took some time to compile), then
click apply and wait for it to install.
We're going to run the project to our avd or mobile device from the directory of ourproject.
2.1 Open up the Command Prompt (preferably as Admin), and chage the directoy to where your project is, the command should look something
like this:
cd Documents/flutterprojects/yourflutterproject.
2.2 Finally type the command flutter run.
Restart the Emulator by holding the power Button and Selecting restart and then try again.
if that failed to work, simply restart your computer.
Today I installed the latest version of Eclipse, Android SDK and AVD plugin. But I have a tedious problem. When I want to quit the emulator (with the X button), the emulator freezes and I can't click anything there anymore. Obviously it has something to do with the sound, because when I execute "pulseaudio -k" in console, the emulator quits.
Due to this fact, I tried the following to let the emulator at least run properly:
In Preferences->Android->Launch -> Default Emulator option -> -noaudio
and
Run Configuration -> Android Application -> [Application] -> Target -> Addidtional Emulator Command Line Options -> -noaudio
But nothing helps. Emulator stays frozen. Actually I want audio to run, but switching it off doesn't work either. So what can I do?
I replied on the issue, but just if interested:
you may need to disable audio output instead, this is not desirable for me, so just select alsa (or esd/oss) by setting environment variable
QEMU_AUDIO_DRV=alsa
Looks like there is no way to specify audio drivers in hardware.ini so the best solution is going to sdk tools directory, rename emulator in emulator.real and make a shell script named emulator containing:
#!/bin/sh
export QEMU_AUDIO_DRV=alsa
exec $(dirname $0)/emulator.real $*
then chmod 755 emulator
It's this problem described here:
http://code.google.com/p/android/issues/detail?id=17294
There is a workaround so that you can quit the emulator:
Set in your virtual devices "Audio Playback Support" and "Audio recording support" to "no".
Sometimes this error occurs:
emulator-5554 disconnected! Cancelling ... activity launch'!
Please tell me what to do.
I had also faced this problem in past and one of below solutions may solve your problem.
first solution
Open Android Virtual Device Manager select the AVD you use for your
app. Press the start button and wait for a new form to show up called
(Launch Options). Check the box "Wipe user data" and hit "Launch"
button.
second solution
go to task manager and process
adb.exe 32* and end this process
then restart your eclipse.
you have to reset your adb. go to Eclipse IDE-->window--> Show Views --> device--> view menu --> reset adb
In my case it seems that AVD file was corrupted. I just created new AVD and it worked.
i am having the same problem described in the following post "Android emulator reports unknown virtual device" Why does the Android emulator report "unknown virtual device", when the device is in my user directory? and have followed all of the instructions in an attempt to resolve but still i cannot run my AVD.
I only have one drive on my Windows 7 machine (C:) and the AVD is being created in the correct location -> C:\Users\MyUser\.android
Ive also tried to setup an environment variable "ANDROID_SDK_HOME"
The actual error is:
emulator: ERROR: unknown virtual device name: 'my_AVD'
emulator: could not find virtual device named 'my_AVD'
Can someone please help me?
For another reason i had to re-format my pc. After a quick rebuild its working fine now. I think the problem happened because in the previous installation of windows, i was playing around with HDD's. Somehow this had caused problems..
Solution: you should have a copy od .android in C:\<your user name>\.
Please try the below steps to solve the above issue -
in task manager kill adb in process
in android sdk folder .. /tools/ run adb kill-server in command line
Check the avd folder name in " ../.adroid/avd/" - say it is "avd1"
run command "emulator -avd avd1 " under android folder "../tool/" in command line
it will start the avd1 device
Now start the eclipse and run your project with setting the "manula" option in configuration.
It will ask for choosing the avd between "avd1" and the existing list of avd's in eclipse if any. You choose "avd1" as it is already running.