Android runtime for NativeScript (based on V8)
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: missing bracket Oct 5, 2018
build-artifacts Upgrade V8 to 7.1.302.32 Dec 19, 2018
docs Update Apr 20, 2018
gradle/wrapper Upgrade gradle to 4.10.2 in main Oct 11, 2018
test-app removed this from method call Jan 21, 2019
tools add DevTools page-agent implementation to display additional files in… Feb 13, 2017
.gitattributes changed default binding package name Feb 17, 2015
.gitignore Add static and default interface methods support Nov 26, 2018
.gitmodules Revert "fix(tooling): wait for emulator before running adb commands (#… Mar 7, 2018
.travis.yml Upgrade V8 to 7.1.302.31 Dec 17, 2018 Updated CHANGELOG with V8 6.9.427.23 Oct 15, 2018 chore: update community files Jan 17, 2018 Update Mar 5, 2015
CodingStyle.Cpp.xml formatted all the code Dec 18, 2015
CodingStyle.Java.xml formatted all the code Dec 18, 2015
LICENSE chore: update community files Jan 7, 2019 docs: forums to Stack Overflow Sep 11, 2018
RUNTIME.iml inital setup Jul 5, 2016
build.gradle removed unneeded semicolumns in gradle Jan 18, 2019 Always quote ANDROID_HOME incase of spaces. Nov 30, 2018
gradlew Plamen5kov/update gradle to latest stable (#849) Oct 12, 2017
gradlew.bat Plamen5kov/update gradle to latest stable (#849) Oct 12, 2017
package.json update android gradle version Jan 18, 2019
v8-versions.json Upgrade V8 to 7.1.302.32 Dec 19, 2018

Android Runtime for NativeScript

Build Status - NativeScript Android Runtime

Contains the source code for the NativeScript's Android Runtime. NativeScript is a framework which enables developers to write truly native mobile applications for Android and iOS using JavaScript and CSS. Each mobile platform has its own ecosystem and offers completely different development tools and language(s) - Java for Android and Objective C (Swift) for iOS. In order to translate JavaScript code to the corresponding native APIs some kind of proxy mechanism is needed. This is exactly what the "Runtime" parts of NativeScript are responsible for. The Android Runtime may be thought of as "The Bridge" between the JavaScript and Android worlds. A NativeScript application for Android is a standard native package (apk) which besides the JavaScript files embed the runtime as well.

Main Projects

The repo is structured in the following projects (ordered by dependencies):

  • android-metadata-generator - generates metadata necessary for the Android Runtime.
  • android-binding-generator - enables Java & Android types to be dynamically created at runtime. Needed by the extend routine.
  • android-runtime - contains the core logic behind the NativeScript's Android Runtime. This project contains native C++ code and needs the Android NDK to build properly.
  • android-runtime-testapp - this is a vanilla Android Application, which contains the tests for the runtime project.

Helper Projects

Architecture Diagram

The NativeScript Android Runtime architecture can be summarized in the following diagram.

Android Runtime diagram

For more details on how it works, read the documentation.

Build Prerequisites

Following are the minimal prerequisites to build the runtime package.

  • Install the latest Android Studio.
  • From the SDK Manager (Android Studio -> Tools -> Android -> SDK Manager) install the following components:
    • Android API Level 23, 24, 25, 26, 27
    • Android NDK
    • Android Support Repository
    • Download Build Tools
    • CMake
    • LLDB
  • Clone this repository as well as the submodules: git clone --recurse-submodules

Working with the Runtime in Android Studio

  • Open the test-app folder in Android Studio. It represents a valid Android project and you are able to build and run a test application working with the Runtime from the source.

Note: You might need to run the Android Studio from the command line in order to preserve the environment variables. This is in case you get errors like "missing npm" if starting the studio the usual way.

How to Build

  • Run command




  • The build process includes building of the runtime package (both optimized and with unstripped v8 symbol table), as well as all supplementary tools used for the android builds: metadata-generator, binding-generator, metadata-generator, static-binding-generator

  • The result of the build will be in the dist folder.

    Note: To cut the build time in half and package only the optimized (stripped) version of the runtime package comment out 'tasks.generateRuntimeAar.execute()' in the build.gradle script.

How to Run Tests

  • Go to subfolder test-app after you built the runtime.

  • Start an emulator or connect a device.

    Note: Keep in mind the device or emulator needs to have an sdcard mounted.

  • Run command

gradlew runtest


We love PRs! Check out the contributing guidelines. If you want to contribute, but you are not sure where to start - look for issues labeled help wanted.


Get Help

Please, use github issues strictly for reporting bugs or requesting features. For general questions and support, check out Stack Overflow or ask our experts in NativeScript community Slack channel.