You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Filip Maj (JIRA)" <ji...@apache.org> on 2013/06/11 18:50:20 UTC
[jira] [Updated] (CB-3758) "cordova emulate android" not working as
expected
[ https://issues.apache.org/jira/browse/CB-3758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filip Maj updated CB-3758:
--------------------------
Summary: "cordova emulate android" not working as expected (was: "ripple android" doesn't work)
Changing the title of issue to reflect the current issue being discussed.
I think these are problems with the underlying, project-level scripts. The following two issues are related:
CB-3627
CB-3626
Essentially, the above two issues prevent the cordova-cli command {{cordova emulate android}} from starting an emulator before attempting to deploy to it (and thus your error).
However, if you start the emulator manually, it should work. I just tried on my machine and the following worked as expected:
{code}
$ cordova create tmp
$ cd tmp
$ cordova platform add android
$ cd platforms/android
$ ./cordova/lib/list-emulator-images
ICS
$ ./cordova/lib/start-emulator ICS
$ cordova -d emulate android
* some output snipped *
BUILD SUCCESSFUL
Total time: 14 seconds
Installing /Users/fil/src/tmp/platforms/android/bin/HelloCordova-debug-unaligned.apk onto emulator-5554...
2257 KB/s (7103530 bytes in 3.072s)
pkg: /data/local/tmp/HelloCordova-debug-unaligned.apk
Success
Launching application...
Starting: Intent { act=android.intent.action.MAIN cmp=io.cordova.hellocordova/.HelloCordova }
Status: ok
Activity: io.cordova.hellocordova/.HelloCordova
ThisTime: 1515
TotalTime: 1515
Complete
Platform "android" deployed to emulator.
{code}
> "cordova emulate android" not working as expected
> -------------------------------------------------
>
> Key: CB-3758
> URL: https://issues.apache.org/jira/browse/CB-3758
> Project: Apache Cordova
> Issue Type: Bug
> Components: CLI
> Affects Versions: 2.8.0
> Environment: Mac
> Reporter: Mike Sierra
> Assignee: Filip Maj
>
> Output from my test "abc" project:
> ulothrix:pg sierra$ cd abc/
> ulothrix:abc sierra$ cordova ripple android
> [TypeError: Cannot call method 'update_project' of undefined]
> ulothrix:abc sierra$ ls platforms/
> android
> ulothrix:abc sierra$ cordova ripple android
> [TypeError: Cannot call method 'update_project' of undefined]
> ulothrix:abc sierra$ cordova build android
> ulothrix:abc sierra$ cordova ripple android
> [TypeError: Cannot call method 'update_project' of undefined]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira