Instrumenting APK unsuccessfull in Cloud monkey - android

When trying to instrument APK it shows Instrumenting APK unsuccessful. Error instrumenting APK. When the emulator was opened before instrumenting in console it showed "Could not initialize OpenglES emulation, using software renderer."
After instrumentation it showed error with message
This is message shown in console
System.getProperty("java.home") = C:\Program Files (x86)\Java\jdk1.7.0_51\jre
Instrumenting C:\Users\dinu\Desktop\EventManagement\CellStash.apk using C:\Users\dinu\AppData\Local\Temp\tools_AndroidInstrumentor1397189107139\tools\mtagent\monkeytalk-agent.jar
Unpacking tools into C:\Users\dinu\AppData\Local\Temp\tools_AndroidInstrumentor1397189107139\tools
Analyzing package Step 1 of 2
Unbundle started in C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1
Unbundle completed with exit code 0
Unbundle output:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\dinu\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
S: Could not decode file, replacing by FALSE value: drawable/popup.9.png
S: Could not decode file, replacing by FALSE value: drawable-mdpi/popup_bg.9.png
S: Could not decode file, replacing by FALSE value: drawable/action_item_selected.9.png
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
Generated project directory: CellStash
AndroidTarget was no defined, obtaining last android target installed
androidTarget= android-19
Analyzing package Step 2 of 2
Dex started: C:\Users\dinu\Desktop\EventManagement\CellStash.apk
Dex completed with exit code 0
Dex output: dex2jar C:\Users\dinu\Desktop\EventManagement\CellStash.apk -> CellStash-dex2jar.jar
Updating package Step 1 of 2
android update project begins: [C:\Users\dinu\AppData\Local\Android\android-sdk\tools\android.bat, update, project, --target, android-19, --path, .]
android update project completed with exit code 0
android update project output:
'xcopy' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Updated and renamed default.properties to project.properties
Updated local.properties
No project name specified, using Activity name 'MainActivity'.
If you wish to change it, edit the first line of build.xml.
Added file C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\build.xml
Added file C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\proguard-project.txt
Analyzing package Step 2 of 2
build of instrumented project begins...
Using android target= android-19
Building with command line: [C:\Users\dinu\AppData\Local\Temp\tools_AndroidInstrumentor1397189107139\tools\ant\bin\ant.bat, -DAPKJAR_DEX=C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\CellStash-dex2jar.jar, -DMTAGENT=C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\libs\monkeytalk-agent.jar, -DERROR_LEVEL=ignore, -DASPECTJ_HOME=C:\Users\dinu\AppData\Local\Temp\tools_AndroidInstrumentor1397189107139\tools\AspectJ, -DANDROID_HOME=C:\Users\dinu\AppData\Local\Android\android-sdk, -DPROJECT_NAME=CellStash, instrument_apk]
Build completed with exit code -1
Build output:
Buildfile: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\build.xml
weave_aspects:
[move] Moving 1 file to C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\libs
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 22.6.2
[checkenv] Installed at C:\Users\dinu\AppData\Local\Android\android-sdk
-setup:
[echo] Project Name: CellStash
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.3
[echo] Resolving Build Target for CellStash...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[gettarget] WARNING: No minSdkVersion value set. Application will install on all Android versions.
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin
[mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\res
[mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\rsObj
[mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\rsLibs
[mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\gen
[mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\classes
[mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\dexedLibs
[echo] ----------
[echo] Resolving Dependencies for CellStash...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[aapt] C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\res\values\drawables.xml:3: error: Resource entry action_item_selected is already defined.
[aapt] res\drawable\action_item_selected.9.png:0: Originally defined here.
[aapt] C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\res\values\drawables.xml:4: error: Resource entry popup is already defined.
[aapt] res\drawable\popup.9.png:0: Originally defined here.
[aapt] C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\res\values-mdpi\drawables.xml:3: error: Resource entry popup_bg is already defined.
[aapt] res\drawable-mdpi\popup_bg.9.png:0: Originally defined here.
BUILD FAILED
C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\build_master.xml:653: The following error occurred while executing this line:
C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\build_master.xml:698: null returned: 1
Total time: 8 seconds
: ERROR: Process exited with an error: 1 (Exit value: 1)
instrumented APK file was not created at: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\CellStash-debug.apk
Error instrumenting apk 'C:\Users\dinu\Desktop\EventManagement\CellStash.apk': instrumented APK file was not created at: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\CellStash-debug.apk
com.gorillalogic.monkeytalk.instrumentor.android.AndroidInstrumentor$InstrumentationException: instrumented APK file was not created at: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\CellStash-debug.apk
at com.gorillalogic.monkeytalk.instrumentor.android.AndroidInstrumentor.copyInstrumentedApk(AndroidInstrumentor.java:235)
at com.gorillalogic.monkeytalk.instrumentor.android.AndroidInstrumentor.beginInstrumentation(AndroidInstrumentor.java:199)
at com.gorillalogic.monkeytalk.instrumentor.android.AndroidInstrumentor.instrumentApk(AndroidInstrumentor.java:130)
at com.gorillalogic.monkeytalk.ide.instrumentor.InstrumentApkAction$InstrumentApkJob.run(InstrumentApkAction.java:137)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Hello it seems you are not the only one with this problem, it's related with Android's pkg-tool and how it's using a decode function (that double checks for the png raw data)
On cloud monkey's forum you will see these two threads:
Error instrumenting apk
Instrumentation failed
I went into android-apktool's forum and basically found this
Project Member #1 connor.tumbleson
This would be a feature prevention against bad PNG's. This isn't a bug.
Status: Invalid
So basically it seems you have invalid 9-Path images could you please try using other 9-Patch image instead (just for testing purposes) and corroborate this?

Related

building error in pgs4a - Linux

I use Fedora Linux
I installed the pgs4a 0.9.4 and have my sdk updated with the api-8 ok, but when I try to build using "./android.py build /home/armando/projects/games/amh release install > log_building.txt", I get this result from my terminal
./android.py build /home/armando/projects/games/amh release install
Updating build files.
Updated project.properties
Updated local.properties
Added file ./build.xml
Updated file ./proguard-project.txt
It seems that there are sub-projects. If you want to update them
please use the --subprojects parameter.
Creating assets directory.
Packaging internal data.
Listing private ...
Listing private/lib ...
Listing private/lib/PIL ...
Listing private/lib/android ...
Compiling private/lib/android/__init__.py ...
Compiling private/lib/android/apk.py ...
Compiling private/lib/android/mixer.py ...
Listing private/lib/encodings ...
Listing private/lib/json ...
Listing private/lib/pygame ...
Listing private/lib/pygame/threads ...
Listing private/lib/sqlite3 ...
Listing /home/armando/projects/games/amh ...
Compiling /home/armando/projects/games/amh/editor.py ...
Compiling /home/armando/projects/games/amh/game.py ...
Listing /home/armando/projects/games/amh/levels ...
Listing /home/armando/projects/games/amh/levels/scores ...
Listing /home/armando/projects/games/amh/res ...
Listing /home/armando/projects/games/amh/res/icons ...
Listing /home/armando/projects/games/amh/res/sfx ...
Listing /home/armando/projects/games/amh/res/tiles ...
Compiling /home/armando/projects/games/amh/run_game.py ...
Compiling /home/armando/projects/games/amh/tile.py ...
Listing engine-private ...
I'm using Ant to build the package.
Buildfile: /home/armando/projects/pgs4a/build.xml
-check-env:
[checkenv] Android SDK Tools Revision 22.6.3
[checkenv] Installed at /home/armando/projects/pgs4a/android-sdk
-setup:
[echo] Project Name: madals_amh
[gettype] Project Type: Application
-pre-clean:
clean:
[delete] Deleting directory /home/armando/projects/pgs4a/bin
[delete] Deleting directory /home/armando/projects/pgs4a/gen
[getlibpath] Library dependencies:
[getlibpath] No Libraries
[subant] No sub-builds to iterate on
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}
-pre-build:
-check-env:
[checkenv] Android SDK Tools Revision 22.6.3
[checkenv] Installed at /home/armando/projects/pgs4a/android-sdk
-setup:
[echo] Project Name: madalenas_mhajong-madalenas
[gettype] Project Type: Application
-build-setup:
[getbuildtools] Using latest Build Tools: 19.1.0
[echo] Resolving Build Target for madals_amh...
[gettarget] Project Target: Android 4.1.2
[gettarget] API level: 16
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /home/armando/projects/pgs4a/bin
[mkdir] Created dir: /home/armando/projects/pgs4a/bin/res
[mkdir] Created dir: /home/armando/projects/pgs4a/bin/rsObj
[mkdir] Created dir: /home/armando/projects/pgs4a/bin/rsLibs
[mkdir] Created dir: /home/armando/projects/pgs4a/gen
[mkdir] Created dir: /home/armando/projects/pgs4a/bin/classes
[mkdir] Created dir: /home/armando/projects/pgs4a/bin/dexedLibs
[echo] ----------
[echo] Resolving Dependencies for madalenas_mhajong-madalenas...
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[aapt] /home/armando/projects/pgs4a/bin/AndroidManifest.xml:2: error: Error: Float types not allowed (at 'versionCode' with value '1.0').
BUILD FAILED
/home/armando/projects/pgs4a/android-sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/armando/projects/pgs4a/android-sdk/tools/ant/build.xml:698: null returned: 1
Total time: 6 seconds
The build seems to have failed.
First: if someone here knows how to solve this error, I would greatly appreciate it if you help me
Second: anybody in this forum know how I can use a existing sdk installation in my home dierctory with I use to compile programs using processing and it is wroking fine for me at now, it install my apk in my device without any problem also.
so, wich file I need to change to apoint to the my "~/sdk" directory, instead of pointing to the "pgs4a/android-sdk" directory, when I command "./android.py build ..." in my shell?
peace!
marquessbr
Posts: 1
Joined: Tue May 20, 2014 11:47 am
Top
Try running
./android.py configure directory
again and use a version number that is an integer.
I have a video of the config process for pgs4a 0.9.4 here:
http://www.youtube.com/watch?v=bEc72xutmco&feature=share&list=PLxvyAnoL-vu5sNgzos6_v6nX-j8N4H-Pd&index=6
It is running on Ubuntu. I've installed pgs4a on Linux a number of times and the install and build went smoothly. Feel free to ask me more questions if you're still stuck.
Oh, I also have a FAQ here:
http://discussion.pychildren.org/t/faq-for-python-on-android-development/9
It was originally intended for kids, but adults seem to be using the FAQ more.

Can't use serve with Cordova / Phonegap helloworld

I've installed Android SDK + Ant + cordova (3.4.1) + set PATH variables (android, ant, cordova commands are available)
At the end of the cordova CLI, there's this exemple usage:
Example usage
$ cordova create Baz
$ cd Baz
$ cordova platform add android
$ cordova build
$ cordova serve android
-----------------------------------
So I tried just that exemple:
sebastien#sebastien-xps:Desktop$ cordova create Baz
Creating a new cordova project with name "HelloCordova" and id "io.cordova.hellocordova" at location "/home/sebastien/Desktop/Baz"
sebastien#sebastien-xps:Desktop$ cd Baz
sebastien#sebastien-xps:Baz$ cordova platform add android
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: io.cordova.hellocordova
Name: HelloCordova
Android target: android-19
Copying template files...
Running: android update project --subprojects --path "platforms/android" --target android-19 --library "CordovaLib"
Resolved location of library project to: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib
Updated and renamed default.properties to project.properties
Updated local.properties
No project name specified, using Activity name 'HelloCordova'.
If you wish to change it, edit the first line of build.xml.
Added file platforms/android/build.xml
Added file platforms/android/proguard-project.txt
Updated project.properties
Updated local.properties
No project name specified, using project folder name 'CordovaLib'.
If you wish to change it, edit the first line of build.xml.
Added file platforms/android/CordovaLib/build.xml
Added file platforms/android/CordovaLib/proguard-project.txt
Project successfully created.
sebastien#sebastien-xps:Baz$ cordova build
Running command: /home/sebastien/Desktop/Baz/platforms/android/cordova/build
Buildfile: /home/sebastien/Desktop/Baz/platforms/android/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 22.6.2
[checkenv] Installed at /home/sebastien/Desktop/devhome/install/adt-bundle-linux-x86_64-20140321/sdk
-setup:
[echo] Project Name: HelloCordova
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.3
[echo] Resolving Build Target for HelloCordova...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/ant-build
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/ant-build/res
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/ant-build/rsObj
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/ant-build/rsLibs
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/ant-gen
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/ant-build/classes
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/ant-build/dexedLibs
[echo] ----------
[echo] Resolving Dependencies for HelloCordova...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
nodeps:
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 22.6.2
[checkenv] Installed at /home/sebastien/Desktop/devhome/install/adt-bundle-linux-x86_64-20140321/sdk
-setup:
[echo] Project Name: CordovaLib
[gettype] Project Type: Android Library
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.3
[echo] Resolving Build Target for CordovaLib...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/res
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/libs
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/res
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/rsObj
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/rsLibs
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-gen
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/classes
[mkdir] Created dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/dexedLibs
[echo] ----------
[echo] Resolving Dependencies for CordovaLib...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 89 source files to /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/classes
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[echo] Creating library output jar file...
[jar] Building jar: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/classes.jar
-post-compile:
-obfuscate:
-dex:
[echo] Library project: do not convert bytecode...
-crunch:
[crunch] Crunching PNG Files in source dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/res
[crunch] To destination dir: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[echo] Library project: do not package resources...
-package:
[echo] Library project: do not package apk...
-post-package:
-do-debug:
[echo] Library project: do not create apk...
[propertyfile] Creating new property file: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/build.prop
-post-build:
debug:
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
[echo] Set jars path to: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/classes.jar
-compile:
[javac] Compiling 3 source files to /home/sebastien/Desktop/Baz/platforms/android/ant-build/classes
-post-compile:
-obfuscate:
-dex:
[dex] input: /home/sebastien/Desktop/Baz/platforms/android/ant-build/classes
[dex] input: /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/classes.jar
[dex] Pre-Dexing /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build/classes.jar -> classes-f44eaf7d8904b207eb36100ec05db9be.jar
[dex] Converting compiled files and external libraries into /home/sebastien/Desktop/Baz/platforms/android/ant-build/classes.dex...
[dx] Merged dex A (7 defs/2.2KiB) with dex B (205 defs/312.8KiB). Result is 212 defs/383.8KiB. Took 0.3s
-crunch:
[crunch] Crunching PNG Files in source dir: /home/sebastien/Desktop/Baz/platforms/android/res
[crunch] To destination dir: /home/sebastien/Desktop/Baz/platforms/android/ant-build/res
[crunch] Processing image to cache: /home/sebastien/Desktop/Baz/platforms/android/res/drawable-hdpi/icon.png => /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable-hdpi/icon.png
[crunch] (processed image to cache entry /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable-hdpi/icon.png: 67% size of source)
[crunch] Processing image to cache: /home/sebastien/Desktop/Baz/platforms/android/res/drawable-ldpi/icon.png => /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable-ldpi/icon.png
[crunch] (processed image to cache entry /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable-ldpi/icon.png: 0% size of source)
[crunch] Processing image to cache: /home/sebastien/Desktop/Baz/platforms/android/res/drawable-mdpi/icon.png => /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable-mdpi/icon.png
[crunch] (processed image to cache entry /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable-mdpi/icon.png: 0% size of source)
[crunch] Processing image to cache: /home/sebastien/Desktop/Baz/platforms/android/res/drawable-xhdpi/icon.png => /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable-xhdpi/icon.png
[crunch] (processed image to cache entry /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable-xhdpi/icon.png: 53% size of source)
[crunch] Processing image to cache: /home/sebastien/Desktop/Baz/platforms/android/res/drawable/icon.png => /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable/icon.png
[crunch] (processed image to cache entry /home/sebastien/Desktop/Baz/platforms/android/ant-build/res/drawable/icon.png: 53% size of source)
[crunch] Crunched 5 PNG files to update cache
-package-resources:
[aapt] Creating full resource package...
-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating HelloCordova-debug-unaligned.apk and signing it with a debug key...
-post-package:
-do-debug:
[zipalign] Running zip align on final apk...
[echo] Debug Package: /home/sebastien/Desktop/Baz/platforms/android/ant-build/HelloCordova-debug.apk
[propertyfile] Creating new property file: /home/sebastien/Desktop/Baz/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: /home/sebastien/Desktop/Baz/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: /home/sebastien/Desktop/Baz/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: /home/sebastien/Desktop/Baz/platforms/android/ant-build/build.prop
-post-build:
[move] Moving 1 file to /home/sebastien/Desktop/Baz/platforms/android/ant-build
[move] Moving 1 file to /home/sebastien/Desktop/Baz/platforms/android/CordovaLib/ant-build
debug:
BUILD SUCCESSFUL
Total time: 18 seconds
sebastien#sebastien-xps:Baz$ cordova serve android
Static file server running on port 8000 (i.e. http://localhost:8000)
CTRL + C to shut down
302 /android/
200 /android/www/
200 /android/www/css/index.css
200 /android/www/cordova.js
200 /android/www/js/index.js
200 /android/www/img/logo.png
This seems to work fine at first glance.
I can open http://localhost:8000 and it displays something:
Package Metadata
name HelloCordova
packageName io.cordova.hellocordova
version 0.0.1
Platforms
ios
android
ubuntu
amazon-fireos
wp7
wp8
blackberry10
www
firefoxos
windows8
Plugins
I can click on the Android link, the problem is when I do so, a strange dialog box appears with question = [], asking me to confirm or cancel the following text prefilled text:
gap:["PluginManager","startup","PluginManager1413322690"]
After accepting, I can see the background Cordova, connecting to device but nothing happens except something that looks like an infinite loop that I can see in the console:
The key "target-densitydpi" is not supported. localhost/:25
Falling back on PROMPT mode since _cordovaNative is missing. Expected for Android 3.2 and lower only. cordova.js:966
698173
processMessage failed: invalid message:
The number 698173 is growing
Can someone tell me what is this strange behavior?
I know it is an old thread, but I had the same issue today and don't really want to install an emulator
you need to add the browser platform to you app
cordova platform add browser
and point your browser to http://localhost:8000/browser/www/
When you're initially prompted with the javascript dialog boxes (e.g. gap: ["PluginManager",...]) you can press Cancel to get the app to load correctly.
After discussions on IRC with a Cordova developer, the serve command is somehow not well documented and it is mostly useful to serve content to the Phonegap App Developer mobile app that was released recently, and as far as I understand it now, it is now intented to serve the application for a regular desktop browser.
For desktop browser testing, I have been succesful until now with the Ripple emulator (not the Chrome plugin which seems unmaintened, but the NPM package).
For exemple you can test in the browser phonegap apps with:
npm install -g ripple-emulator
ripple emulate
This may help you: https://github.com/stample/gulp-browserify-react-phonegap-starter

Ruboto - On running rake-install start, app does not get powered up on emulator

With the basic setup done, when i run rake install start, i just get the build successful message and nothing beyond that. Nothing gets powered up in the emulator which is running on the side for me. I am just starting to write android apps using ruby and this is just a getting started app generated using ruboto gen app.
Here is what i get on running rake install start :
Sid:quick_start SID$ rake install start
/Users/SID/Documents/workspace/android_test/quick_start/src/quick_start_activity.rb changed.
Forcing rebuild of /Users/SID/Documents/workspace/android_test/quick_start/bin/QuickStart-debug.apk.
ant debug
Buildfile: /Users/SID/Documents/workspace/android_test/quick_start/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 22.6.2
[checkenv] Installed at /Users/SID/android-sdk-macosx
-setup:
[echo] Project Name: QuickStart
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.3
[echo] Resolving Build Target for QuickStart...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /Users/SID/Documents/workspace/android_test/quick_start/bin/rsObj
[mkdir] Created dir: /Users/SID/Documents/workspace/android_test/quick_start/bin/rsLibs
[echo] ----------
[echo] Resolving Dependencies for QuickStart...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Found new input file
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
[javac] Compiling 1 source file to /Users/SID/Documents/workspace/android_test/quick_start/bin/classes
-post-compile:
-obfuscate:
-dex:
[dex] input: /Users/SID/Documents/workspace/android_test/quick_start/bin/classes
[dex] Found modified input file
[dex] Converting compiled files and external libraries into /Users/SID/Documents/workspace/android_test/quick_start/bin/classes.dex...
-crunch:
[crunch] Crunching PNG Files in source dir: /Users/SID/Documents/workspace/android_test/quick_start/res
[crunch] To destination dir: /Users/SID/Documents/workspace/android_test/quick_start/bin/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[aapt] No changed resources or assets. QuickStart.ap_ remains untouched
-package:
[apkbuilder] Found modified input file
[apkbuilder] Creating QuickStart-debug-unaligned.apk and signing it with a debug key...
-post-package:
-do-debug:
[zipalign] Running zip align on final apk...
[echo] Debug Package: /Users/SID/Documents/workspace/android_test/quick_start/bin/QuickStart-debug.apk
[propertyfile] Updating property file: /Users/SID/Documents/workspace/android_test/quick_start/bin/build.prop
[propertyfile] Updating property file: /Users/SID/Documents/workspace/android_test/quick_start/bin/build.prop
[propertyfile] Updating property file: /Users/SID/Documents/workspace/android_test/quick_start/bin/build.prop
[propertyfile] Updating property file: /Users/SID/Documents/workspace/android_test/quick_start/bin/build.prop
-post-build:
debug:
BUILD SUCCESSFUL
Total time: 7 seconds
And here are the modifications i made in the dx file:
# By default, give dx a max heap size of 1 gig. This can be overridden
# by using a "-J" option (see below).
defaultMx="-Xmx2048M"
defaultMx="-Xmx1024M"
Here is my avd which i setup :
Sid:quick_start SID$ android list avd
Available Android Virtual Devices:
Name: Android_4.4
Path: /Users/SID/.android/avd/Android_4.4.avd
Target: Android 4.4.2 (API level 19)
Tag/ABI: default/x86
Skin: WVGA800
Sdcard: 1000M
Please let me know if i am doing anything wrong.
Ideally,
rake install start should take me beyond build successful to something like this for instance and the app should be powered up on the emulator :
adb shell date -s 20131120.102437
Wed Nov 20 10:24:37 EST 2013
Installing package org.ruboto.example.quick_start
pkg: /data/local/tmp/QuickStart-debug.apk
Success
526 KB/s (74474 bytes in 0.138s)
This is a bug in Ruboto 1.0.3 and older, and only happens when deploying to Android 4.4 kitkat.
The bug has been fixed here: https://github.com/ruboto/ruboto/issues/585
You can apply the same change in your project to work around this bug.

How to convert a Windows Phone 8 App (which is done by using Cordova/PhoneGap) to an Android App

Update:
I followed the instructions given by benka and MBillau and then I got the Android project generated and built successfully!! So happy about it!
Now I am stuck at emulating the project on the Android emulator. Here is the error message I got when running the emulate command:
F:\Workplace\Cordova3.3.1>cordova emulate android
Generating config.xml from defaults for platform "android"
Preparing android project
Running on emulator for platform "android" via command "cmd" /c F:\Workplace\Cordova3.3.1\platforms\android\cordova\run --emulator
Error: An error occurred while emulating/deploying the android project.
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
at ChildProcess.<anonymous> (C:\Users\franv_000\AppData\Roaming\npm\node_modules\cordova\src\emulate.js:67:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
I actually got another error when building the Android project, but the error message for that one was clear and descriptive, so I fixed that easily. But this error message makes e confusing and have no idea where to go in order to find the solution.
Your help and time will be appreciated!
Firstly, I'd like to appreciate PhoneGap/Cordova which provides us its fantastic abilities.
Now, I have finished my development on WP8 platform with Cordova and I have set up the environment for Android development(installed Java, Ant, Android Development Tool as well as Eclipse, emulator and created the virtual Android phone)
What I also did was using CLI to add the Android platform, so I got a folder: Android under platform folder.
When I opened that folder, I was expecting to see the similar folder structure as what I've seen under wp8 folder, but it's quite different.
To be honest, I don't even know to which folder I should copy my index.html.
And I have checked the documentation of Cordova/PhoneGap. but found nothing.
Actually, a set of guidelines about how to convert a mobile app from A platform to B platform should be put in a very obvious place on that website(After all, the main purpose of using PhoneGap/Cordova is to code once and then generate apps on different mobile platforms easily)
I am grateful if someone can help me out about this question and give me the clear guidelines about how to do it.
Thank you in advance.
Update 2: Error log when running cordova emulate -d android
F:\Workplace\Cordova3.3.1>cordova emulate -d android
cordova library for "android" already exists. No need to download. Continuing.
Generating config.xml from defaults for platform "android"
Calling plugman.prepare for platform "android"
Preparing android project
Processing configuration changes for plugins.
Iterating over installed plugins: [ 'org.apache.cordova.contacts',
'org.apache.cordova.device',
'org.apache.cordova.device-motion',
'org.apache.cordova.device-orientation',
'org.apache.cordova.dialogs',
'org.apache.cordova.geolocation',
'org.apache.cordova.network-information',
'org.apache.cordova.splashscreen',
'org.apache.cordova.vibration' ]
Writing out cordova_plugins.js...
Ensuring plugin "org.apache.cordova.contacts" is installed correctly...
Plugin "org.apache.cordova.contacts" is good to go.
Ensuring plugin "org.apache.cordova.device" is installed correctly...
Plugin "org.apache.cordova.device" is good to go.
Ensuring plugin "org.apache.cordova.device-motion" is installed correctly...
Plugin "org.apache.cordova.device-motion" is good to go.
Ensuring plugin "org.apache.cordova.device-orientation" is installed correctly...
Plugin "org.apache.cordova.device-orientation" is good to go.
Ensuring plugin "org.apache.cordova.dialogs" is installed correctly...
Plugin "org.apache.cordova.dialogs" is good to go.
Ensuring plugin "org.apache.cordova.geolocation" is installed correctly...
Plugin "org.apache.cordova.geolocation" is good to go.
Ensuring plugin "org.apache.cordova.network-information" is installed correctly...
Plugin "org.apache.cordova.network-information" is good to go.
Ensuring plugin "org.apache.cordova.splashscreen" is installed correctly...
Plugin "org.apache.cordova.splashscreen" is good to go.
Ensuring plugin "org.apache.cordova.vibration" is installed correctly...
Plugin "org.apache.cordova.vibration" is good to go.
Wrote out Android application name to "MCBTimetable"
Wrote out Android package name to "io.cordova.MCBTimetable"
Running on emulator for platform "android" via command "cmd" /c F:\Workplace\Cordova3.3.1\platforms\android\cordova\run --emulator
exec: ant clean -f "F:\Workplace\Cordova3.3.1\platforms\android\build.xml"
[ 'ant clean -f "F:\\Workplace\\Cordova3.3.1\\platforms\\android\\build.xml"',
null,
'Buildfile: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\build.xml\r\n\r\n-check-env:\r\n [checkenv] Android SDK Tools Revision 22.3.0\r\n [checkenv] Inst
alled at D:\\Installation packages\\Java\\adt-bundle-windows-x86_64-20131030\\adt-bundle-windows-x86_64-20131030\\sdk\r\n\r\n-setup:\r\n [echo] Project Name
: MCBTimetable\r\n [gettype] Project Type: Application\r\n\r\n-pre-clean:\r\n\r\nclean:\r\n [delete] Deleting directory F:\\Workplace\\Cordova3.3.1\\platform
s\\android\\bin\r\n [delete] Deleting directory F:\\Workplace\\Cordova3.3.1\\platforms\\android\\gen\r\n[getlibpath] Library dependencies:\r\n[getlibpath] \r\
n[getlibpath] ------------------\r\n[getlibpath] Ordered libraries:\r\n\r\nnodeps:\r\n\r\n-check-env:\r\n [checkenv] Android SDK Tools Revision 22.3.0\r\n [chec
kenv] Installed at D:\\Installation packages\\Java\\adt-bundle-windows-x86_64-20131030\\adt-bundle-windows-x86_64-20131030\\sdk\r\n\r\n-setup:\r\n [echo] Pr
oject Name: CordovaLib\r\n [gettype] Project Type: Android Library\r\n\r\n-pre-clean:\r\n\r\nclean:\r\n [delete] Deleting directory F:\\Workplace\\Cordova3.3
.1\\platforms\\android\\CordovaLib\\bin\r\n [delete] Deleting directory F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\gen\r\n\r\nBUILD SUCCESSF
UL\r\nTotal time: 1 second\r\n',
'' ]
exec: ant debug -f "F:\Workplace\Cordova3.3.1\platforms\android\build.xml"
[ 'ant debug -f "F:\\Workplace\\Cordova3.3.1\\platforms\\android\\build.xml"',
null,
'Buildfile: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\build.xml\r\n\r\n-set-mode-check:\r\n\r\n-set-debug-files:\r\n\r\n-check-env:\r\n [checkenv] Andr
oid SDK Tools Revision 22.3.0\r\n [checkenv] Installed at D:\\Installation packages\\Java\\adt-bundle-windows-x86_64-20131030\\adt-bundle-windows-x86_64-2013103
0\\sdk\r\n\r\n-setup:\r\n [echo] Project Name: MCBTimetable\r\n [gettype] Project Type: Application\r\n\r\n-set-debug-mode:\r\n\r\n-debug-obfuscation-check
:\r\n\r\n-pre-build:\r\n\r\n-build-setup:\r\n[getbuildtools] Using latest Build Tools: 19.0.0\r\n [echo] Resolving Build Target for MCBTimetable...\r\n[gett
arget] Project Target: Android 4.4.2\r\n[gettarget] API level: 19\r\n [echo] ----------\r\n [echo] Creating output directories if needed...\r\n
[mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\
res\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\rsObj\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\
android\\bin\\rsLibs\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\gen\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\p
latforms\\android\\bin\\classes\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\dexedLibs\r\n [echo] ----------\r\n [e
cho] Resolving Dependencies for MCBTimetable...\r\n[dependency] Library dependencies:\r\n[dependency] \r\n[dependency] ------------------\r\n[dependency] Ordere
d libraries:\r\n[dependency] \r\n[dependency] ------------------\r\n [echo] ----------\r\n [echo] Building Libraries with \'debug\'...\r\n\r\nnodeps:\r\
n\r\n-set-mode-check:\r\n\r\n-set-debug-files:\r\n\r\n-check-env:\r\n [checkenv] Android SDK Tools Revision 22.3.0\r\n [checkenv] Installed at D:\\Installation
packages\\Java\\adt-bundle-windows-x86_64-20131030\\adt-bundle-windows-x86_64-20131030\\sdk\r\n\r\n-setup:\r\n [echo] Project Name: CordovaLib\r\n [gettype
] Project Type: Android Library\r\n\r\n-set-debug-mode:\r\n\r\n-debug-obfuscation-check:\r\n\r\n-pre-build:\r\n\r\n-build-setup:\r\n[getbuildtools] Using latest
Build Tools: 19.0.0\r\n [echo] Resolving Build Target for CordovaLib...\r\n[gettarget] Project Target: Android 4.4.2\r\n[gettarget] API level: 19\
r\n [echo] ----------\r\n [echo] Creating output directories if needed...\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\C
ordovaLib\\bin\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\bin\\res\r\n [mkdir] Created dir: F:\\Workplace\\Cord
ova3.3.1\\platforms\\android\\CordovaLib\\bin\\rsObj\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\bin\\rsLibs\r\n
[mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\gen\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\andro
id\\CordovaLib\\bin\\classes\r\n [mkdir] Created dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\bin\\dexedLibs\r\n [echo] ----------\r
\n [echo] Resolving Dependencies for CordovaLib...\r\n[dependency] Library dependencies:\r\n[dependency] No Libraries\r\n[dependency] \r\n[dependency] -----
-------------\r\n\r\n-code-gen:\r\n[mergemanifest] Merging AndroidManifest files into one.\r\n[mergemanifest] Manifest merger disabled. Using project manifest o
nly.\r\n [echo] Handling aidl files...\r\n [aidl] No AIDL files to compile.\r\n [echo] ----------\r\n [echo] Handling RenderScript files...\r\n
[echo] ----------\r\n [echo] Handling Resources...\r\n [aapt] Generating resource IDs...\r\n [echo] ----------\r\n [echo] Handling BuildConf
ig class...\r\n[buildconfig] Generating BuildConfig class.\r\n\r\n-pre-compile:\r\n\r\n-compile:\r\n [javac] Compiling 73 source files to F:\\Workplace\\Cord
ova3.3.1\\platforms\\android\\CordovaLib\\bin\\classes\r\n [javac] Note: Some input files use or override a deprecated API.\r\n [javac] Note: Recompile wi
th -Xlint:deprecation for details.\r\n [echo] Creating library output jar file...\r\n [jar] Building jar: F:\\Workplace\\Cordova3.3.1\\platforms\\andro
id\\CordovaLib\\bin\\classes.jar\r\n\r\n-post-compile:\r\n\r\n-obfuscate:\r\n\r\n-dex:\r\n [echo] Library project: do not convert bytecode...\r\n\r\n-crunch
:\r\n [crunch] Crunching PNG Files in source dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\res\r\n [crunch] To destination dir: F:\\Work
place\\Cordova3.3.1\\platforms\\android\\CordovaLib\\bin\\res\r\n [crunch] Crunched 0 PNG files to update cache\r\n\r\n-package-resources:\r\n [echo] Libr
ary project: do not package resources...\r\n\r\n-package:\r\n [echo] Library project: do not package apk...\r\n\r\n-post-package:\r\n\r\n-do-debug:\r\n
[echo] Library project: do not create apk...\r\n[propertyfile] Creating new property file: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\bin\\bui
ld.prop\r\n[propertyfile] Updating property file: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\bin\\build.prop\r\n[propertyfile] Updating proper
ty file: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\bin\\build.prop\r\n[propertyfile] Updating property file: F:\\Workplace\\Cordova3.3.1\\pla
tforms\\android\\CordovaLib\\bin\\build.prop\r\n\r\n-post-build:\r\n\r\ndebug:\r\n\r\n-code-gen:\r\n[mergemanifest] Merging AndroidManifest files into one.\r\n[
mergemanifest] Manifest merger disabled. Using project manifest only.\r\n [echo] Handling aidl files...\r\n [aidl] No AIDL files to compile.\r\n [ec
ho] ----------\r\n [echo] Handling RenderScript files...\r\n [echo] ----------\r\n [echo] Handling Resources...\r\n [aapt] Generating resource I
Ds...\r\n [echo] ----------\r\n [echo] Handling BuildConfig class...\r\n[buildconfig] Generating BuildConfig class.\r\n\r\n-pre-compile:\r\n\r\n-compile
:\r\n [javac] Compiling 17 source files to F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\classes\r\n\r\n-post-compile:\r\n\r\n-obfuscate:\r\n\r\n-dex
:\r\n [dex] input: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\classes\r\n [dex] input: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\Cor
dovaLib\\bin\\classes.jar\r\n [dex] Pre-Dexing F:\\Workplace\\Cordova3.3.1\\platforms\\android\\CordovaLib\\bin\\classes.jar -> classes-a9bfeb13801703244de
81d2eb7af0f8a.jar\r\n [dex] Converting compiled files and external libraries into F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\classes.dex...\r\n
[dx] Merged dex A (46 defs/73.9KiB) with dex B (174 defs/271.6KiB). Result is 220 defs/420.7KiB. Took 0.2s\r\n\r\n-crunch:\r\n [crunch] Crunching PNG Fi
les in source dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\res\r\n [crunch] To destination dir: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\
\res\r\n [crunch] Processing image to cache: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\res\\drawable-hdpi\\icon.png => F:\\Workplace\\Cordova3.3.1\\pla
tforms\\android\\bin\\res\\drawable-hdpi\\icon.png\r\n [crunch] (processed image to cache entry F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\res\\d
rawable-hdpi\\icon.png: 67% size of source)\r\n [crunch] Processing image to cache: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\res\\drawable-ldpi\\icon.
png => F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\res\\drawable-ldpi\\icon.png\r\n [crunch] (processed image to cache entry F:\\Workplace\\Cordov
a3.3.1\\platforms\\android\\bin\\res\\drawable-ldpi\\icon.png: 0% size of source)\r\n [crunch] Processing image to cache: F:\\Workplace\\Cordova3.3.1\\platfor
ms\\android\\res\\drawable-mdpi\\icon.png => F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\res\\drawable-mdpi\\icon.png\r\n [crunch] (processed imag
e to cache entry F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\res\\drawable-mdpi\\icon.png: 0% size of source)\r\n [crunch] Processing image to cache
: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\res\\drawable-xhdpi\\icon.png => F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\res\\drawable-xhdpi\\i
con.png\r\n [crunch] (processed image to cache entry F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\res\\drawable-xhdpi\\icon.png: 53% size of source
)\r\n [crunch] Processing image to cache: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\res\\drawable\\icon.png => F:\\Workplace\\Cordova3.3.1\\platforms\\
android\\bin\\res\\drawable\\icon.png\r\n [crunch] (processed image to cache entry F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\res\\drawable\\icon
.png: 53% size of source)\r\n [crunch] Crunched 5 PNG files to update cache\r\n\r\n-package-resources:\r\n [aapt] Creating full resource package...\r\n
[aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.\r\n\r\n-pack
age:\r\n[apkbuilder] Current build type is different than previous build: forced apkbuilder run.\r\n[apkbuilder] Creating MCBTimetable-debug-unaligned.apk and s
igning it with a debug key...\r\n\r\n-post-package:\r\n\r\n-do-debug:\r\n [zipalign] Running zip align on final apk...\r\n [echo] Debug Package: F:\\Workpla
ce\\Cordova3.3.1\\platforms\\android\\bin\\MCBTimetable-debug.apk\r\n[propertyfile] Creating new property file: F:\\Workplace\\Cordova3.3.1\\platforms\\android\
\bin\\build.prop\r\n[propertyfile] Updating property file: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\build.prop\r\n[propertyfile] Updating property
file: F:\\Workplace\\Cordova3.3.1\\platforms\\android\\bin\\build.prop\r\n[propertyfile] Updating property file: F:\\Workplace\\Cordova3.3.1\\platforms\\android
\\bin\\build.prop\r\n\r\n-post-build:\r\n\r\ndebug:\r\n\r\nBUILD SUCCESSFUL\r\nTotal time: 15 seconds\r\n',
'' ]
exec: adb devices
[ 'adb devices', null, 'List of devices attached \r\n\r\n', '' ]
exec: adb devices
[ 'adb devices', null, 'List of devices attached \r\n\r\n', '' ]
exec: android list avds
[ 'android list avds',
null,
'Available Android Virtual Devices:\n Name: MyVA\n Path: C:\\Users\\franv_000\\.android\\avd\\MyVA.avd\n Target: Android 4.4.2 (API level 19)\n ABI
: armeabi-v7a\n Skin: 768x1280\n',
'' ]
exec: android list avds
[ 'android list avds',
null,
'Available Android Virtual Devices:\n Name: MyVA\n Path: C:\\Users\\franv_000\\.android\\avd\\MyVA.avd\n Target: Android 4.4.2 (API level 19)\n ABI
: armeabi-v7a\n Skin: 768x1280\n',
'' ]
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
child_process.spawn(cmd,[/c, F:\Workplace\Cordova3.3.1\platforms\android\cordova\run, --emulator]) = 8
Error: An error occurred while emulating/deploying the android project.
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
at ChildProcess.<anonymous> (C:\Users\franv_000\AppData\Roaming\npm\node_modules\cordova\src\emulate.js:67:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
When you add the android platform through CLI it should create all the necessary folders and copy your shared code from the main www folder (supposed you had your shared code in the main www folder, and not in platform/wp8).
Your index.html should go into the /www folder. It will then get copied to platform/android/assets/www folder when you add Android platform or when you build your app using the CLI tool. (Thanks #MBillau for your input as it should be more clear.)
In case you have implemented any native code for your WP8 app you will probably have to implement it for your Android app as well.
As to the solution for the updated issue, I have found it, here is what to do:
Just run after starting emulator manually.
Create an Emulator by using the UI
type android in cmd and hit enter, a GUI will come.
Under tools section click “manage AVDs” and follow the further instruction to create a new AVD.
Start Emulator
emulator.exe -avd avdname in cmd (wait for few minutes for full start up)
now re run cordova. it will work.
Cordova android emulator stopped working

jenkins can't archive the debug apk

I'm trying to set up jenkins for building android apps and archiving builds.
However, it seems that I can't archive the debug apk.
Ant is run with "clean debug" and "archive artifacts" is selected. I tried with */.apk and with bin/test-debug.apk, which is the file I want(and is visible through the jenkins workspace browser.
console log:
Started by user anonymous
Building in workspace /var/lib/jenkins/jobs/test-project/workspace
Checkout:workspace / /var/lib/jenkins/jobs/test-project/workspace - hudson.remoting.LocalChannel#eb3f66
Using strategy: Default
Last Built Revision: Revision bae064038961f07de92252f6f65d222e90d2d871 (origin/HEAD, origin/master)
Checkout:workspace / /var/lib/jenkins/jobs/test-project/workspace - hudson.remoting.LocalChannel#eb3f66
Fetching changes from 1 remote Git repository
Fetching upstream changes from /home/andraz/test/.git
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision bae064038961f07de92252f6f65d222e90d2d871 (origin/HEAD, origin/master)
Checking out Revision bae064038961f07de92252f6f65d222e90d2d871 (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
[workspace] $ ant -Dsdk.dir=/home/andraz/android-sdk-linux clean debug
Buildfile: /var/lib/jenkins/jobs/test-project/workspace/build.xml
-pre-clean:
clean:
[delete] Deleting directory /var/lib/jenkins/jobs/test-project/workspace/bin
[delete] Deleting directory /var/lib/jenkins/jobs/test-project/workspace/gen
-set-mode-check:
-set-debug-files:
-set-debug-mode:
-debug-obfuscation-check:
-setup:
[echo] Creating output directories if needed...
[mkdir] Created dir: /var/lib/jenkins/jobs/test-project/workspace/bin
[mkdir] Created dir: /var/lib/jenkins/jobs/test-project/workspace/bin/res
[echo] Gathering info for test...
[setup] Android SDK Tools Revision 17
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup] API<=15: Adding annotations.jar to the classpath.
[setup]
[setup] ------------------
[setup] WARNING: No minSdkVersion value set. Application will install on all Android versions.
-build-setup:
[mkdir] Created dir: /var/lib/jenkins/jobs/test-project/workspace/gen
[mkdir] Created dir: /var/lib/jenkins/jobs/test-project/workspace/bin/classes
-pre-build:
-code-gen:
[echo] ----------
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 4 source files to /var/lib/jenkins/jobs/test-project/workspace/bin/classes
-post-compile:
-obfuscate:
-dex:
[dex] Converting compiled files and external libraries into /var/lib/jenkins/jobs/test-project/workspace/bin/classes.dex...
-crunch:
[crunch] Crunching PNG Files in source dir: /var/lib/jenkins/jobs/test-project/workspace/res
[crunch] To destination dir: /var/lib/jenkins/jobs/test-project/workspace/bin/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[aapt] Creating full resource package...
-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating test-debug-unaligned.apk and signing it with a debug key...
-post-package:
-do-debug:
[zipalign] Running zip align on final apk...
[echo] Debug Package: /var/lib/jenkins/jobs/test-project/workspace/bin/test-debug.apk
[propertyfile] Creating new property file: /var/lib/jenkins/jobs/test-project/workspace/bin/build.prop
[propertyfile] Updating property file: /var/lib/jenkins/jobs/test-project/workspace/bin/build.prop
[propertyfile] Updating property file: /var/lib/jenkins/jobs/test-project/workspace/bin/build.prop
[propertyfile] Updating property file: /var/lib/jenkins/jobs/test-project/workspace/bin/build.prop
-post-build:
debug:
BUILD SUCCESSFUL
Total time: 4 seconds
Archiving artifacts
ERROR: No artifacts found that match the file pattern "**/*.apk". Configuration error?
Build step 'Archive the artifacts' changed build result to FAILURE
Finished: FAILURE
it seems to me that file is generated but somehow not found.
also if I chose to archive bin/test* it stores test-debug-unaligned.apk.d, test.apk_, test.apk.d but no apks
any insights?
It seems that the file is simply not there when archiving happens. As a last build step run shell script that executes ls -l bin and see if the file is indeed there by examining the console output.

Categories

Resources