Skip to content

Instantly share code, notes, and snippets.

@brianchirls
Created March 23, 2015 14:47
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 brianchirls/2b497a0561763030e774 to your computer and use it in GitHub Desktop.
Save brianchirls/2b497a0561763030e774 to your computer and use it in GitHub Desktop.
tns run android --emulator --log trace
Starting watch on killswitch /var/folders/3y/vhmdsjk90w17389dp4_zznbw0000gn/T/Home/KillSwitches/cli
Looking for project in '/Users/Home/code/tns-hello-world'
Project directory is '/Users/Home/code/tns-hello-world'.
spawn: adb version
Project successfully prepared
spawn: emulator -help
Project successfully prepared
spawn: ant debug -f /Users/Home/code/tns-hello-world/platforms/android/build.xml
Buildfile: /Users/Home/code/tns-hello-world/platforms/android/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at /Users/Home/Library/Android/sdk
-setup:
[echo] Project Name: tns-hello-world
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
[echo] Resolving Build Target for tns-hello-world...
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for tns-hello-world...
[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] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
-post-compile:
-obfuscate:
-dex:
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/bin/classes
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/libs/support-v4-r13.jar
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/libs/gson-2.2.4.jar
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/libs/nativescript.jar
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/libs/android-support-lib-bindings.jar
[dex] Using Pre-Dexed support-v4-r13-541bf887953d6c90f288f157a18ece77.jar <- /Users/Home/code/tns-hello-world/platforms/android/libs/support-v4-r13.jar
[dex] Using Pre-Dexed gson-2.2.4-e752e2a7851ef1a07199727e2b06c64b.jar <- /Users/Home/code/tns-hello-world/platforms/android/libs/gson-2.2.4.jar
[dex] Using Pre-Dexed nativescript-6c7fc38fe2d863d0fa44847a1b925d67.jar <- /Users/Home/code/tns-hello-world/platforms/android/libs/nativescript.jar
[dex] Using Pre-Dexed android-support-lib-bindings-a07eb8ac2ed8d91c1ad7ef1d55086b8e.jar <- /Users/Home/code/tns-hello-world/platforms/android/libs/android-support-lib-bindings.jar
[dex] No new compiled code. No need to convert bytecode to dalvik format.
-crunch:
[crunch] Crunching PNG Files in source dir: /Users/Home/code/tns-hello-world/platforms/android/res
[crunch] To destination dir: /Users/Home/code/tns-hello-world/platforms/android/bin/res
[crunch] Processing image to cache: /Users/Home/code/tns-hello-world/platforms/android/res/drawable-hdpi/icon.png => /Users/Home/code/tns-hello-world/platforms/android/bin/res/drawable-hdpi/icon.png
[crunch] (processed image to cache entry /Users/Home/code/tns-hello-world/platforms/android/bin/res/drawable-hdpi/icon.png: 0% size of source)ERROR: 9-patch image /Users/Home/code/tns-hello-world/platforms/android/res/drawable-nodpi/splashscreen.9.png malformed.
[crunch] Processing image to cache: /Users/Home/code/tns-hello-world/platforms/android/res/drawable-ldpi/icon.png => /Users/Home/code/tns-hello-world/platforms/android/bin/res/drawable-ldpi/icon.png
[crunch] No marked region found along edge.
[crunch] Found along top edge.
[crunch]
[crunch] (processed image to cache entry /Users/Home/code/tns-hello-world/platforms/android/bin/res/drawable-ldpi/icon.png: 0% size of source)
[crunch] Processing image to cache: /Users/Home/code/tns-hello-world/platforms/android/res/drawable-mdpi/icon.png => /Users/Home/code/tns-hello-world/platforms/android/bin/res/drawable-mdpi/icon.png
[crunch] (processed image to cache entry /Users/Home/code/tns-hello-world/platforms/android/bin/res/drawable-mdpi/icon.png: 0% size of source)
[crunch] Processing image to cache: /Users/Home/code/tns-hello-world/platforms/android/res/drawable-nodpi/splashscreen.9.png => /Users/Home/code/tns-hello-world/platforms/android/bin/res/drawable-nodpi/splashscreen.9.png
[crunch] Crunched 4 PNG files to update cache
-package-resources:
[aapt] Found modified input file
[aapt] Creating full resource package...
-package:
[apkbuilder] Found modified input file
[apkbuilder] Creating tns-hello-world-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/Home/code/tns-hello-world/platforms/android/bin/tns-hello-world-debug.apk
[propertyfile] Updating property file: /Users/Home/code/tns-hello-world/platforms/android/bin/build.prop
[propertyfile] Updating property file: /Users/Home/code/tns-hello-world/platforms/android/bin/build.prop
[propertyfile] Updating property file: /Users/Home/code/tns-hello-world/platforms/android/bin/build.prop
[propertyfile] Updating property file: /Users/Home/code/tns-hello-world/platforms/android/bin/build.prop
-post-build:
debug:
BUILD SUCCESSFUL
Total time: 8 seconds
spawn: java -jar /usr/local/lib/node_modules/nativescript/resources/tools/metadata-generator.jar /Users/Home/code/tns-hello-world/lib/Android /Users/Home/code/tns-hello-world/lib/Android/__metadata
Skip com.tns.android.support.v4.app.TaskStackBuilderHoneycomb
Skip com.tns.android.support.v4.net.TrafficStatsCompatIcs
Skip com.tns.android.support.v4.view.ViewCompatJB
spawn: ant debug -f /Users/Home/code/tns-hello-world/platforms/android/build.xml
Buildfile: /Users/Home/code/tns-hello-world/platforms/android/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 24.1.2
[checkenv] Installed at /Users/Home/Library/Android/sdk
-setup:
[echo] Project Name: tns-hello-world
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 21.1.2
[echo] Resolving Build Target for tns-hello-world...
[gettarget] Project Target: Android 5.0.1
[gettarget] API level: 21
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for tns-hello-world...
[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] No changed resources. R.java and Manifest.java untouched.
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
-post-compile:
-obfuscate:
-dex:
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/bin/classes
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/libs/support-v4-r13.jar
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/libs/gson-2.2.4.jar
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/libs/nativescript.jar
[dex] input: /Users/Home/code/tns-hello-world/platforms/android/libs/android-support-lib-bindings.jar
[dex] Using Pre-Dexed support-v4-r13-541bf887953d6c90f288f157a18ece77.jar <- /Users/Home/code/tns-hello-world/platforms/android/libs/support-v4-r13.jar
[dex] Using Pre-Dexed gson-2.2.4-e752e2a7851ef1a07199727e2b06c64b.jar <- /Users/Home/code/tns-hello-world/platforms/android/libs/gson-2.2.4.jar
[dex] Using Pre-Dexed nativescript-6c7fc38fe2d863d0fa44847a1b925d67.jar <- /Users/Home/code/tns-hello-world/platforms/android/libs/nativescript.jar
[dex] Using Pre-Dexed android-support-lib-bindings-a07eb8ac2ed8d91c1ad7ef1d55086b8e.jar <- /Users/Home/code/tns-hello-world/platforms/android/libs/android-support-lib-bindings.jar
[dex] No new compiled code. No need to convert bytecode to dalvik format.
-crunch:
[crunch] ERROR: 9-patch image /Users/Home/code/tns-hello-world/platforms/android/res/drawable-nodpi/splashscreen.9.png malformed.
[crunch] No marked region found along edge.
[crunch] Found along top edge.
[crunch] Crunching PNG Files in source dir: /Users/Home/code/tns-hello-world/platforms/android/res
[crunch] To destination dir: /Users/Home/code/tns-hello-world/platforms/android/bin/res
[crunch] Processing image to cache: /Users/Home/code/tns-hello-world/platforms/android/res/drawable-nodpi/splashscreen.9.png => /Users/Home/code/tns-hello-world/platforms/android/bin/res/drawable-nodpi/splashscreen.9.png
[crunch] Crunched 1 PNG files to update cache
-package-resources:
[aapt] Found modified input file
[aapt] Creating full resource package...
-package:
[apkbuilder] Found modified input file
[apkbuilder] Creating tns-hello-world-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/Home/code/tns-hello-world/platforms/android/bin/tns-hello-world-debug.apk
[propertyfile] Updating property file: /Users/Home/code/tns-hello-world/platforms/android/bin/build.prop
[propertyfile] Updating property file: /Users/Home/code/tns-hello-world/platforms/android/bin/build.prop
[propertyfile] Updating property file: /Users/Home/code/tns-hello-world/platforms/android/bin/build.prop
[propertyfile] Updating property file: /Users/Home/code/tns-hello-world/platforms/android/bin/build.prop
-post-build:
debug:
BUILD SUCCESSFUL
Total time: 8 seconds
Project successfully built
Using /Users/Home/code/tns-hello-world/platforms/android/bin/tns-hello-world-debug.apk
Could not find an emulator image to run your project.
Usage:
$ tns run android [--device <Device ID>] [--keyStorePath <File Path> --keyStorePassword <Password> --keyStoreAlias <Name> --keyStoreAliasPassword <Password>] [--release]
$ tns run android --emulator [<Emulator Options>] [--keyStorePath <File Path> --keyStorePassword <Password> --keyStoreAlias <Name> --keyStoreAliasPassword <Password>] [--release]
Runs your project on a connected Android device or in a native Android emulator, if configured. This is shorthand for prepare, build and deploy.
<Device ID> is the index or name of the target device as listed by $ tns device
<Emulator Options> is any valid combination of options as listed by $ tns help emulate android
Prerequisites:
Before running your app in the Android emulator from the Android SDK, verify that your system meets the following requirements.
* Verify that you are running the NativeScript CLI on a Windows, OS X or Linux system.
* Verify that you have installed the Android SDK.
* Verify that you have added the following Android SDK directories to the PATH environment variable:
platform-tools
tools
Before running your app in the Genymotion emulator, verify that your system meets the following requirements.
* Verify that you have installed Genymotion.
* On Windows and Linux systems, verify that you have added the Genymotion installation directory to the PATH environment variable.
* On OS X systems, verify that you have added the following paths to the PATH environment variable.
* /Applications/Genymotion.app/Contents/MacOS/
* /Applications/Genymotion Shell.app/Contents/MacOS/
Options:
--device - Specifies a connected device on which to run the app.
You cannot use --device and --emulator simultaneously.
--emulator - If set, runs the app in a native emulator for the target platform, if configured.
When set, you can also set any other valid combination of emulator options as listed by $ tns help emulate android
You cannot use --device and --emulator simultaneously.
--release - If set, produces a release build. Otherwise, produces a debug build.
When the --keyStore* options are specified, produces a signed release build.
--keyStorePath - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK.
You can use the --keyStore* options along with --release to produce a signed release build.
You need to specify all --keyStore* options.
--keyStorePassword - Provides the password for the keystore file specified with --keyStorePath.
You can use the --keyStore* options along with --release to produce a signed release build.
You need to specify all --keyStore* options.
--keyStoreAlias - Provides the alias for the keystore file specified with --keyStorePath.
You can use the --keyStore* options along with --release to produce a signed release build.
You need to specify all --keyStore* options.
--keyStoreAliasPassword - Provides the password for the alias specified with --keStoreAliasPassword.
You can use the --keyStore* options along with --release to produce a signed release build.
You need to specify all --keyStore* options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment