android


Error running emulator on android


I'm trying to run a phonegap app on android and when i run the command
phonegap run android --emulator --verbose
I am getting this error
Running command "getprop emu.uuid" on emulator-5554...
How do i fix this, any ideas? I tried opening it via both command line and android studio emulator hands in both.
I have found that if I manually start the AVD before issuing the run command then I do not get this error. Also I found that running an older version of android solves this issue. I do not know exactly how this happens. Running windows 10.
I was getting this error on a Android 6.0 API Level 23 Device with cordova on fedora 23 with qemu.
It would run the cordova emulate android and the emulator would show but the app wouldn't install or open in the emulator.
My problem was caused by cordova trying to wait for the device to be ready by polling getprop emu.uuid on the adb shell.
Running getprop emu.uuid in the adb shell didn't yield any results. Looking at the output of getprop shows that an available property is dev.bootcomplete.
I fixed it by changing the following code in platforms/android/cordova/lib/emulator.js (around lines 215-230) to wait for dev.bootcomplete to be 1 instead of polling emu.uuid:
module.exports.wait_for_emulator = function(uuid) {
...
new_started.forEach(function (emulator) {
promises.push(
//Adb.shell(emulator, 'getprop emu.uuid') REMOVE THIS
Adb.shell(emulator, 'getprop dev.bootcomplete')
.then(function (output) {
//if (output.indexOf(uuid) >= 0) { REMOVE THIS
if (output == 1) {
emulator_id = emulator;
}
})
);
});
...
This may break when you're running multiple emulators at once.
It looks like the problem is with the emulator. cordova runs emulator -avd <device-name> -prop emu.uuid=cordova_emulator_<date> but emu.uuid isn't properly set in the emulator.
Hope this helps somebody.
This worked for me as well, but is there any reason behind why 'ionic emulator android' doesn't work when it launches AVD by itself?
I've observed below behaviour :
- Before : 'ionic emulator android' used to launch emulator but then doesn't launch the splashscreen of my application. Saw below lines on cmd. Seems like emulator is starting on different port and ionic expects it to be on different port?
after : after following above steps, it worked. As if, now emulator know which AVD to use. Still a mystery to me.
Now : After i uninstalled the app from AVD and when i tried the command again (ionic emulate android), landed in same situation as 'Before'.
I would be interested in knowing why the command didn't work as it is documented in ionic/cordova documentation.

Related Links

Android different screen size issues (Testing on Galaxy S1, S2, S3 and Note2 etc)
Debugging my Android app [closed]
getSelectedText on inactive InputConnection-working on retrieving Title Column from CalendarContract.Events in android
Showing map inside a circle
How to support MOV(quick time) in android?
how to read images from folder not url help me so show in mapview ballon
Simple DELETE statement did not work in SQlite [duplicate]
how to edit run.sh file in eclipse
eclipse, new android application project, “next button” is disabled in section that wants the project name
How to check whether the user's data (username & email address) exist in database or not? [closed]
FragmentPagerAdapter Exists Only In Android.Support.V4.App (and not Android.App)
Please why do I get the error "SQLiteException: no such table: tabella (code1)?
Making a graph plot - Need to calculate x and y in own thread
Oauth on Appengine with Google Play services
Android:Button Click to show datepicker and then date from datepicker.Button is in every listview item in ArrayAdapter
Images are not displayed in HTC desire but it works in other devices

Categories

HOME
windows
sonarqube
checkstyle
deep-learning
awk
jmeter
yahoo-finance
serialization
replace
3d-reconstruction
visual-studio-emulator
gembox-spreadsheet
onclick
frontend
character
teechart
g++
package-managers
coin3d
job-scheduling
dreamweaver
google-content-api
html5-appcache
oledb
windows-xp
inno-download-plugin
event-store
definitelytyped
ms-access-web-app
soot
android-things
sinch
winpe
volatile
python-2.6
mustache
jmockit
jbutton
memory-address
apiary.io
docfx
chef-solo
doc
odoo-website
dcmtk
dbnull
glm-math
wc
apache-directory
nanoc
ovf
opennms
chai-as-promised
geotiff
compiler-design
cmp
renaming
visual-studio-2008-sp1
usart
angular2-testing
custom-lists
signalr.client
expectations
respondcms
bizagi
boost-serialization
mobiledoc-kit
directdraw
sciruby
dllimport
oracle-spatial
include-guards
amiga
adehabitathr
rapidsvn
big-ip
gii
create.js
winginx
memset
buffering
mutual-authentication
paste
getopt
time.h
argouml
intersect
panda3d
objectquery
jquery-address
promotion-code
update-statement
xui
http-daemon
metaweblog
facebook-iframe
non-clustered-index
binomial-heap
tabpanel
blender-2.49
burndowncharts
filesystemobject
feasibility
asynchronous-wcf-call
xpsdocument

Resources

Encrypt Message