library add command is deprecated and will be removed completely in one of our next releases (currently scheduled for 1.5).
You cannot create NativeScript plugins with Android native code using Eclipse projects. You need to import your Eclipse project into Android Studio, convert it to Gradle build and consume the produced AAR file.
You cannot use Apache Ant to create new projects for Android but you can continue build your existing Ant-based projects. Starting with NativeScript 1.3, Android builds require Gradle. Run tns doctor on the command line to learn more.
Building NativeScript projects for Android requires Android SDK 22, Android SDK Build-tools 22, Android Support Repository and ANDROID_HOME environment variable set. Run android to configure Android SDK.
- Implemented #390: Support tns_modules from npm.
- Implemented #686: Support building of XCode workspaces.
- Implemented #687: Android build with Gradle.
- Implemented #729: CocoaPods support from plugins.
- Implemented #785: Add platform on each platform related command.
- Implemented #875: Init command configure tns-core-modules version.
- Fixed #662: Failed
tns platform add androidcommand leaves the project in inconsistent state. - Fixed #730:
tns livesync androidthrows stdout maxBuffer exceeded. - Fixed #772:
tns platform update ioscommand does not update metadata generator. - Fixed #793: The NativeScript CLI writes errors on stdout.
- Fixed #797: Plugin add does not merge plugins's Info.plist file.
- Fixed #811:
tns livesync <Platform> --watchreports an error when platform specific file is changed. - Fixed #826: Failed
tns prepare <Platform>command leaves the project in inconsistent state. - Fixed #829: Fail to build the project when
nativescript-telerik-uiplugin is added before the platform. - Fixed #866: The NativeScript CLI is not able to detect java on Ubuntu.
- Fixed #896:
tns run <Platform>aftertns livesync <Platform>starts the last synced app on the device.
- Fixed #806:
tns library add androidcommand does not execute android project update if target 17 is not installed. - Fixed #807: Android native libs are not respected correctly if the plugin is added as depedency to another plugin.
- Fixed #776:
tns livesync ios --emulator --watchdoesn't sync changes. - Fixed #777:
tns library add iosdoes not build correct relative paths to referenced frameworks for mdgenerator. - Fixed #779: Command failed due to space in library reference path.
- Implemented #470: Add
--timeoutoption totns debug. - Implemented #682: Set
--debug-brkas the default option oftns debug. - Implemented #706: LiveSync to iOS Simulator.
- Fixed #470: Command failed due to space in file path.
- Fixed #632: Android debugger does not work on some OS X systems.
- Fixed #652:
tns debug iosdoes not load inspector from the added iOS runtime. - Fixed #663: Verify that Java is at least 1.7.
- Fixed #671:
tns debug iosdoesn't work for projects created with framework versions earlier than 1.2.0. - Fixed #679:
tns library add iosadds the framework with its full path in the Xcode project. - Fixed #695: Exceptions tracking is not correctly set in the user settings.
- Fixed #699: Unable to update Android platform when npm cache is in an inconsistent state.
- Fixed #722:
tns debugbuilds and installs the app twice. - Fixed #742:
tns livesync androiddoesn't work on some Android devices. - Fixed #747: New files are not respected by
tns livesync.
- Fixed #690: The
$ tns debug ios --debug-brkcommand does not work.
- Implemented #621: Added the
$ tns error-reportingcommand. By default, anonymous error reporting is enabled. - Implemented #620: Renamed the
$ tns feature-usage-trackingcommand to$ tns usage-reporting. By default, anonymous usage reporting is enabled. - Implemented #523: Added the
$ tns livesync <Platform>command. You can use it to quickly synchronize changes to connected devices without re-building and re-deploying your apps. - Implemented #510: Improvements and updates to the
$ tns pluginsets of commands.- You can create and work with custom NativeScript plugins which contain Android native libraries.
- You can create and work with custom NativeScript plugins which contain iOS dynamic native libraries.
- The
$ tns plugin removecommand removes the Android native libraries carried by the plugin.
- Implemented #480: Added the
$ tns doctorcommand. You can use it to quickly check for any configuration issues which might prevent the NativeScript CLI from working properly.
- Fixed #658: The
$ tns platform removecommand does not remove framework data frompackage.jsonfor the project. - Fixed #644: You cannot build your app for Android, if it contains a custom
styles.xml. - Fixed #632: On OS X systems with custom Chrome builds, you cannot debug Android apps. To be able to debug Android apps, you need to set the name of the custom Chrome build in the
ANDROID_DEBUG_UI_MACsetting inconfig.json. - Fixed #629: The
$ tns preparecommand does not populate the platform-specific directories correctly, if your project contains both an npm module, installed using$ npm install, and a NativeScript plugin, installed using$ tns plugin add. - Fixed #574: The
$ tns prepare ioscommand does not preserve file name casing when populating the platform-specific directories. - Fixed #538: The NativeScript CLI interprets files whose names contain
iosorandroidas platform-specific files and renames them, even if they are not platform-specific. - Fixed #281: The
$ tns platform removecommand does not print any status message when the operation is successful. - Fixed #271: The
$ tns createcommand does not validate the path provided with the--copy-fromoption. - Fixed #139: The
$ tns preparecommand does not remove files from the platform-specific directories correctly.
- Implemented #600: Added the
$ tns initcommand. You can use it to initialize a NativeScript project for development. The command recreates or updates thepackage.jsonfile of the project. You can then run$ tns installto install the platforms and dependencies described in thepackage.jsonfile. - Implemented #587: Added the
$ tns installcommand. You can use it to quickly install all platforms and dependencies described in apackage.jsonfile.
- Fixed #606: The NativeScript CLI lets you run
<Platform>-based commands on operating systems which do not support development for this platform. For example, you can run$ tns build ioson a Windows system. - Fixed #601: The NativeScript CLI does not treat the dependencies of devDependencies as devDependencies.
- Fixed #599: The NativeScript CLI always creates a
tmpdirectory in the current directory when you run any command and modifies thepackage.jsonfile for the project. - Fixed #584: The NativeScript CLI references the files in the project with their absolute paths instead of their relative paths. This might cause the project to stop working when transfered to another location and might cause issues with your application packages.
- Fixed #578: Platform-specific files in NativeScript plugins are not processed correctly. The NativeScript CLI copies them to the correct platform-specific directory but does not rename them correctly.
- Fixed #520: iOS resources from the
App_Resourcesfolder are not included in the native Xcode project and are not accessible in the application package.
- Implemented #551: You can now develop for Android 5.1.1 (API Level 22). If you have this SDK installed on your system, the CLI will set it as the default target SDK when you run
$ tns platform add android - Implemented #552: You can now set the target Android SDK for your project by specifying the
--sdkoption for$ tns platform add androidoperations.
- Fixed #555: In some cases, the CLI merges incorrectly the plugin platform-specific
AndroidManifest.xmlorInfo.plistwith the respective platform-specific configuration files from the project. - Fixed #567: You cannot use npm as a package manager inside your project.
- Fixed #569: On some Windows systems, the CLI installation shows errors in the console.
- Replaced
.tnsprojectwithpackage.jsonto let you use npm and work with custom plugins in your project.
The first time you run any NativeScript command on an existing project, your.tnsprojectfile will be automatically transformed into apackage.jsonfile describing your project configuration and data. After this, make sure to commit and push your changes if you are using version control.
After the transformation is complete, you can install and use custom NativeScript plugins inside your project.
- Implemented #510: You can work with custom NativeScript plugins in your project. You can add a plugin from an npm package, a local folder, a URL or a
.tar.gzfile. For more information, run$ tns help plugin - Implemented #362: You can use npm as package manager for your NativeScript projects.
- Updated #358: Multiple improvements and bug fixes for iOS debugging.
- Fixed #446: Autocompletion might continue to work after disabling because
tns autocomplete disabledoes not update.profilefiles. - Fixed #391: The default 9-patch image for Android projects is malformed and causes error messages in the build log.
- Fixed #324: When you run commands for the
iosplatform, the NativeScript CLI might show the following unrelated adb warning:Unable to find adb in PATH. Default one from %s resources will be used. - Fixed #309: You cannot open the device log for streaming with the
tns device logcommand.
- Fixed #498: On some Linux and OS X systems, when the USER or SUDO_USER environment variables are missing, you cannot run NativeScript CLI commands. The following error appears when you attempt to run
nativescriptortnscommands:TypeError: Arguments to path.join must be strings.
- Fixed #459: You cannot add a third-party iOS native library to your project, if the path to the library contains spaces.
- Fixed #458: If you have installed Xcode 6.2 or earlier on your system, you cannot debug in the iOS Simulator.
- Fixed #413: If your project name contains a hyphen, the NativeScript CLI sets your application identifier inconsistently across the project.
- Implemented #447:
tns run ios,tns run androidandtns emulate androidprint the output of the running application in the console. - Implemented #441: Improved command-line completion.
- Implemented #416: Improved installation.
- Implemented #358: Improved
tns debug ios.
- Fixed #446:
tns autocomplete disablemight not disable command-line completion properly. - Fixed #445: For some commands, HTML help is shown instead of the console help.
- Fixed #444: When you attempt to install the
nativescriptnpm module usingsudo, errors might be shown. - Fixed #443: When you attempt to configure command-line completion during installation,
ENOENTerror might be shown. - Fixed #442: The console does not show links properly.
- Fixed #394: On OS X or Linux systems, the NativeScript CLI does not resolve symlinks and you cannot build your apps.
- Fixed #391: The Android splash screen image in the template is malformed and causes errors in the build log.
- Fixed #324: If the Android SDK is not properly configured, when you run
tns build ios,run ios,tns deploy iosortns emulate ios, the NativeScript CLI prints an irrelevant adb-related warning. - Fixed #309: You cannot open the device log for streaming with
tns device log. - Fixed #276: On bash consoles, command-line completion does not work.
- Introduced new project structure. To migrate to the new structure, complete the following steps.
- Manually move all files and folders from the inner
appfolder one level up inside the outerappfolder. - Remove the now empty inner
appfolder. - Verify that your project structure reflects the structure described here.
- Manually move all files and folders from the inner
- Implemented #388: Improved the
--log traceglobal option. - Implemented #387: Improved installation.
- Implemented #350: Improved command-line completion.
- Implemented #175: You can run your app in Android virtual devices, created from the Google APIs images from the Android SDK.
- Implemented #88, #291: Introduced context-aware console help which you can access by running
tns <Command> -hand extended HTML help which you access by runningtns help <Command>.
- Fixed #380: When you run
tns build android,tns run android,tns deploy androidortns emulate android, the NativeScript CLI builds your project twice. - Fixed #371: On Android 5.x devices, NativeScript apps load very slowly on first run.
- Fixed #260: On bash consoles, the
opencommand might stop working. - Fixed #257: On bash consoles, you cannot pass arguments with spaces, even if escaped.
- Fixed #251: On OS X systems, the command validation might not work properly.
- Fixed #248: On OS X systems, the
tns deploycommand might not release the console. - Fixed #169: The native Xcode project is created with an incorrect name.
- Fixed #348:
tns platform add iosdownloads the latest experimental version of the ios runtime instead of the latest stable version.
- Fixed #312:
tns platform add iosdoes not preserve your app ID, if not default.
- Implemented #305, #322: You can quickly add or update your platform runtime to a specific version by running
tns platform update platform@version
For example:tns platform update ios@0.9.2-beta
The NativeScript team will publish experimental support for the latest versions of iOS and Android.
To list all available versions for android, run $ npm view tns-android versions
To list only experimental versions for android, run $ npm view tns-android dist-tags To list all available versions for ios, run $ npm view tns-ios versions
To list only experimental versions for ios, run $ npm view tns-ios dist-tags - Implemented #302: You can configure proxy settings for the NativeScript CLI.
- Fixed #299: You cannot build the default
Hello Worldapp for Android on OS X systems. - Fixed #297: You cannot install the NativeScript CLI.