Contains the source code for the NativeScript's Android runtime. The android-runtime is a main component used in NativeScript.
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.
- android-static-binding-generator - build tool that generates bindings based on the user's javascript code
- android-binding-generator-tester - contains the tests for the binding-generator project.
- build/project-template - this is an empty placeholder Android Application project, used by the NativeScript CLI when building an Android project.
The source in this repo is organized in Eclipse projects, using the ADT plugin. Following are the needed software if you need to build the project locally.
- Install the latest Android SDK. Set path sdk.
- Install the ADT Plugin and the supported Eclipse version as described on the plugin page.
- Download Android API Level 22 through the SDK Manager.
- Download and install the Android NDK. Set path to ndk.
- Download and install Gradle (min version 2.3) Set path to gradle.
- Download Android Support Repository through the Android SDK Manager (needed by gradle)
- Download Build Tools 22 through the Android SDK Manager.
- Run command
gradle packar
- The result of the build will be in the dist folder.
-
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
gradle runtest