Skip to content

Instantly share code, notes, and snippets.

@sebv
Created October 21, 2014 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebv/9854f5443e2095ade2b6 to your computer and use it in GitHub Desktop.
Save sebv/9854f5443e2095ade2b6 to your computer and use it in GitHub Desktop.
➜ ~ cordova -v
4.0.0
➜ ~ cordova create hello com.example.hello HelloWorld
Creating a new cordova project with name "HelloWorld" and id "com.example.hello" at location "/Users/baba/hello"
➜ ~ cd hello
➜ hello cordova platform add android
Creating android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.example.hello
Name: HelloWorld
Android target: android-19
Copying template files...
Project successfully created.
➜ hello cat config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.hello" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloWorld</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
</widget>
➜ hello cordova build android
Running command: /Users/baba/hello/platforms/android/cordova/build
Buildfile: /Users/baba/hello/platforms/android/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 22.6.4
[checkenv] Installed at /Users/baba/Documents/Tools/android/sdk
-setup:
[echo] Project Name: CordovaApp
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.0
[echo] Resolving Build Target for CordovaApp...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /Users/baba/hello/platforms/android/ant-build
[mkdir] Created dir: /Users/baba/hello/platforms/android/ant-build/res
[mkdir] Created dir: /Users/baba/hello/platforms/android/ant-build/rsObj
[mkdir] Created dir: /Users/baba/hello/platforms/android/ant-build/rsLibs
[mkdir] Created dir: /Users/baba/hello/platforms/android/ant-gen
[mkdir] Created dir: /Users/baba/hello/platforms/android/ant-build/classes
[mkdir] Created dir: /Users/baba/hello/platforms/android/ant-build/dexedLibs
[echo] ----------
[echo] Resolving Dependencies for CordovaApp...
[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.4
[checkenv] Installed at /Users/baba/Documents/Tools/android/sdk
-setup:
[echo] Project Name: CordovaApp
[gettype] Project Type: Android Library
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.0
[echo] Resolving Build Target for CordovaApp...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/res
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/libs
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/ant-build
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/ant-build/res
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/ant-build/rsObj
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/ant-build/rsLibs
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/ant-gen
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/ant-build/classes
[mkdir] Created dir: /Users/baba/hello/platforms/android/CordovaLib/ant-build/dexedLibs
[echo] ----------
[echo] Resolving Dependencies for CordovaApp...
[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 93 source files to /Users/baba/hello/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: /Users/baba/hello/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: /Users/baba/hello/platforms/android/CordovaLib/res
[crunch] To destination dir: /Users/baba/hello/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: /Users/baba/hello/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /Users/baba/hello/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /Users/baba/hello/platforms/android/CordovaLib/ant-build/build.prop
[propertyfile] Updating property file: /Users/baba/hello/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: /Users/baba/hello/platforms/android/CordovaLib/ant-build/classes.jar
-compile:
[javac] Compiling 3 source files to /Users/baba/hello/platforms/android/ant-build/classes
-post-compile:
-obfuscate:
-dex:
[dex] input: /Users/baba/hello/platforms/android/ant-build/classes
[dex] input: /Users/baba/hello/platforms/android/CordovaLib/ant-build/classes.jar
[dex] Pre-Dexing /Users/baba/hello/platforms/android/CordovaLib/ant-build/classes.jar -> classes-1c9762387842d4a5af846ec965056e2d.jar
[dex] Converting compiled files and external libraries into /Users/baba/hello/platforms/android/ant-build/classes.dex...
[dx] Merged dex A (7 defs/2.2KiB) with dex B (209 defs/317.3KiB). Result is 216 defs/389.2KiB. Took 0.4s
-crunch:
[crunch] Crunching PNG Files in source dir: /Users/baba/hello/platforms/android/res
[crunch] To destination dir: /Users/baba/hello/platforms/android/ant-build/res
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-hdpi/icon.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-hdpi/icon.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-hdpi/icon.png: 67% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-land-hdpi/screen.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-land-hdpi/screen.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-land-hdpi/screen.png: 97% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-land-ldpi/screen.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-land-ldpi/screen.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-land-ldpi/screen.png: 96% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-land-mdpi/screen.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-land-mdpi/screen.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-land-mdpi/screen.png: 97% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-land-xhdpi/screen.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-land-xhdpi/screen.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-land-xhdpi/screen.png: 99% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-ldpi/icon.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-ldpi/icon.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-ldpi/icon.png: 0% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-mdpi/icon.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-mdpi/icon.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-mdpi/icon.png: 0% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-port-hdpi/screen.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-port-hdpi/screen.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-port-hdpi/screen.png: 97% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-port-ldpi/screen.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-port-ldpi/screen.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-port-ldpi/screen.png: 97% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-port-mdpi/screen.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-port-mdpi/screen.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-port-mdpi/screen.png: 99% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-port-xhdpi/screen.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-port-xhdpi/screen.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-port-xhdpi/screen.png: 99% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable-xhdpi/icon.png => /Users/baba/hello/platforms/android/ant-build/res/drawable-xhdpi/icon.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable-xhdpi/icon.png: 53% size of source)
[crunch] Processing image to cache: /Users/baba/hello/platforms/android/res/drawable/icon.png => /Users/baba/hello/platforms/android/ant-build/res/drawable/icon.png
[crunch] (processed image to cache entry /Users/baba/hello/platforms/android/ant-build/res/drawable/icon.png: 53% size of source)
[crunch] Crunched 13 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 CordovaApp-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/baba/hello/platforms/android/ant-build/CordovaApp-debug.apk
[propertyfile] Creating new property file: /Users/baba/hello/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: /Users/baba/hello/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: /Users/baba/hello/platforms/android/ant-build/build.prop
[propertyfile] Updating property file: /Users/baba/hello/platforms/android/ant-build/build.prop
-post-build:
[move] Moving 1 file to /Users/baba/hello/platforms/android/ant-build
[move] Moving 1 file to /Users/baba/hello/platforms/android/CordovaLib/ant-build
debug:
BUILD SUCCESSFUL
Total time: 39 seconds
Built the following apk(s):
/Users/baba/hello/platforms/android/ant-build/CordovaApp-debug.apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment