Cordova failed to launch app on Android emulator - android

I installed Cordova 4.2.0 and tried to launch my cordovaApp on android emulator.
I got this error message:
Failed to launch app on emulator: Failed to install apk to emulator: Error executing "adb -s
emulator-5556 install -r "C:\xampp\htdocs\CordovaApp\platforms\android\ant-build\CordovaApp-
debug.apk"": failed to copy 'C:\xampp\htdocs\CordovaApp\platforms\android\ant-build\CordovaApp-
debug.apk' to '/data/local/tmp/CordovaApp-debug.apk': No such file or directory
Command finished with error code 8: C:\xampp\htdocs\CordovaApp\platforms\android\cordova\run.bat
--emulator
Error: C:\xampp\htdocs\CordovaApp\platforms\android\cordova\run.bat: Command failed with exit
code 8
at ChildProcess.whenDone
(C:\Users\windows8new\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-
lib\src\cordova\superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)
C:\xampp\htdocs\CordovaApp\nbproject\build.xml:275: exec returned: 1
I'm new in this so I don't know what to do. Can somebody help me?
Thank you very much.

Related

Cordova building error on Windows

I am having a tremendous problem with cordova. For some reason, the command cordova build gives me the following error and I cannot figure out why. I try to do a simple andoid application on Windows 7.
C:\Users\User\Documents\Cordova\workshop>cordova build
Running command: cmd "/s /c "C:\Users\User\Documents\Cordova\workshop\platforms\
android\cordova\build.bat""
[Error: Please install Android target: "android-22".
Hint: Open the SDK manager by running: C:\Users\User\AppData\Local\Android\sdk\t
ools\android.BAT
You will require:
1. "SDK Platform" for android-22
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\User\AppData\Roaming\npm\node_modules\cor
dova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:818:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
C:\Users\User\Documents\Cordova\workshop>
Do you have any advice how to solve this problem?

Difficulty getting ionic emulate android to work

I have been successfully emulating my ionic project with ios but am unable to get it to come up on the Android emulator on my Mac. I get the following error from ionic:
/Users/billnoble/documents/cues/code/current/Cues-App/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Target 'WQVGA400' not found, unable to run project
Error: /Users/billnoble/documents/cues/code/current/Cues-App/platforms/android/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
I have the Android SDK installed and skins installed in the library/android/sdk/platforms/android-22/skins directory. I have checked that the WQVGA400 skin is in there.
The ionic command I am issuing is:
ionic emulate android --target="WQVGA400"
Am I missing a step?

ionic build android error not creating the apk file

When I ran the following command:
ionic build android
in the command prompt on my Windows 7 machine I get the following errors pop up:
BUILD FAILED
C:\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:542: Unable to resolve project target 'android-21'
Total time: 1 second
C:\Users\<user name>\Hello_Android\platforms\android\cordova\node_modules\q\q.js:126
throw e;
Error code 1 for command: cmd with args: /s /c "ant-debug -f "C:\Users\<user name>\Hello_Android\platforms\android\build.xml" -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build the project
Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone <C:\Users\<user name>\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23>
at ChildProcess.emit <events.js:110:17>
at maybeClose <child_process.js:1015:16>
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
Could anybody help me please with this problem?

cordova build error on ubuntu when trying to build from terminal

I am getting the following error when trying to build sencha app in terminal on ubuntu meachine..
edge#edge-HP:~/Desktop/Anupam2014/MobileAtSite_Aug23/cordova$ cordova build
Running command: /home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/cordova/build
Buildfile: /home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/build.xml
BUILD FAILED
/home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/build.xml:90: Cannot find
/home/transnoesis/Downloads/adt-bundle-linux-x86_64-20130729/sdk/tools/ant/build.xml imported from
/home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/build.xml
Total time: 0 seconds
Error code 1 for command: ant with args: debug,-
f,/home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: /home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/src/superspawn.js:126:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
This looks path settings issue and is unable to find path to sdk & ant tools.
Currently I am on Windows and see how I've set paths on Windows, so you check and set yours accordingly on Ubuntu, hope will help you.
ANT_Home: C:\Program Files\apache-ant-1.9.4
Java_Home: C:\Program Files\Java\jdk1.7.0_60
ANDROID_HOME: C:\Android\AndroidSDK\sdk
path:.;C:\Program Files\nodejs\;%ANT_HOME%\bin;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;

ionic emulate android not working

I am trying to create a blank project using ionic framework. But I'm getting the following error when I run the ionic emulate android command.
Error executing "adb devices": /bin/sh: 1: adb: not found
Error: /home/username/todo/platforms/android/cordova/run: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I also have added android sdk path to .bashrc file.
export ANDROID_HOME="$HOME/username/android/eclipse/adt-bundle/sdk/tools"
export ANDROID_PLATFORM_TOOLS="$HOME/username/eclipse/adt-bundle/sdk/platform-tools"
export PATH="$ANDROID_HOME:$ANDROID_PLATFORM_TOOLS:$PATH"
I have also install the eclipse adt bundle for 64 bits. any kind of help would be appreciated.
Error executing "adb devices": /bin/sh: 1: adb: not found
Do you have adb in your path? If not, put it. It comes with android sdk

Categories

Resources