Configure trial Nativescript to develop Android, iOS native apps

Source: Internet
Author: User

Learn Nativescript for the first time read CSDN article "Native Experience can't stop!" JavaScript Open source cross-platform framework Nativescript ".

Introduced

Nativescript is an open-source framework that uses JavaScript to build cross-platform native mobile apps that support iOS, Android, and Windows Phone. And the use of nativescript without too many requirements, just use the JavaScript and CSS skills you have mastered to develop a truly native user experience of mobile applications.

As a free open source project, Nativescript's source code has been hosted on GitHub, allowing developers to use it without any threshold constraints. Beyond the need to learn a new programming language, use the familiar JavaScript encoding and CSS to create app styles, Nativescript has the power to use cross-platform UI abstraction, shared business logic, and third-party native libraries.

Characteristics

100% Access Native Platform API: the entire native platform functionality is available in the JavaScript layer.

Based on Ecmascript5+javascript and CSS standards: Use existing skills to build native apps.

100% shared code: Build Android, iOS, and WindowsPhone apps based on one-time encoding.

Note: The above content from the "native experience can't stop!" JavaScript Open source cross-platform framework Nativescript ".

Environment configuration:

To streamline the installation process, I chose to install an integrated Android Studio instead of the ADT Eclipse environment.

First, the Android development environment configuration

1. Download and install the Java SDK;

2. Configure JAVA_HOME system environment variable to JDK directory, path append%java_home%\bin;

3. Download and install Android Studio from the ANDROIDSDK Development Kit domestic or Android development environment, note the SDK directory address, default to "c:\users\< system user name >\appdata\local\android\ SDK ";

4. Configure the Android_home system environment variable to "<SDK directory >\ platform-tools", "<sdk directory >\tools";

5. Download Build-tools 21.1.1, find 21.1.2 in the SDK sub-directory Build-tools, create folder 21.1.1; Download files from android-5.0 folder in build-tools21.1.1 to < SDK directory > \build-tools\21.1.1;

6. Execute the <SDK directory under the >\extras\intel\hardware_accelerated_execution_manager directory of Intelhaxm-android.exe for Intel x86 installation of image files;

Second, NODEJS environment configuration

1. Download and install Nodejs

2. Download, install ant, configure Ant_home system environment variable to ant directory, path append%ant_home%\bin;

3. Enter the Nodejs to run the SC queryintelhaxm to check if the Intel HAXM is installed successfully, if the status is running the installation is successful, otherwise the Android development environment configuration 6th step check;

Third, Nativescript installation

1. Enter the Nodejs command line and execute Npminstall–g nativescript;

Iv. Test Run

1. Create the project TNS create MYAPP;

2. Start the AVD Manager, create the AVD, and remember the name of the AVD;

3. Enter the project path, such as CD MYAPP

4. TNS emulate ANDROID–AVD <AVD name > can be tested and debugged by the AVD run Nativescript application;

Welcome to use Nativescript

Are you a hybrid app developer trying to find a way to create a real native app? Or are you a local app developer who wants to know how to extend your app to other popular platforms? Or are you a web developer looking for ways to turn existing technologies into mobile development?

Nativescript lets you develop real-life native apps for iOS and Android, using only simple JavaScript code bases or typescript, XML, and CSS. Nativescript lets you write cross-platform code and transform it into a programming language for the target platform.

How does it work?

Develop business logic using JavaScript or typescript, design and style your user interface with XML and CSS, and let Nativescript convert your simple application code into real iOS and Android native apps.

1. Write your app code using the Nativescript module and the Nativescript runtime. The module exposes iOS and Android native devices and platform capabilities in a consistent manner allowing you to access them through non-platform-specific code.

The module allows you to access additional local capabilities through the JavaScript code specified by the platform.

2. Customize your app to specify the asset tag and splash screen through the platform.

3. Create your app. When you create your app, the Nativescript runtime transforms your non-platform-specific code into the local language for your target platform, while the Nativescript tool uses the local Platform SDK and tools to create a local application package.

4. Run your three cross-platform local apps on a local virtual machine or on a real device, or publish them to testers and end users. Nativescript reduces the complexity of native application development in terms of both the required skills and system setup for coding.

As a start, you need JavaScript or typescript knowledge to implement your business logic, using XML and CSS knowledge to design your interface and the inspiration for your mobile app. You don't need Java or objective-c knowledge.

Configure trial Nativescript to develop Android, iOS native apps

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.