|
11 | 11 |
|
12 | 12 | ## First Launch
|
13 | 13 | - Open Android Studio - Click `Open an existing Android Studio project`
|
14 |
| -  |
| 14 | + -  |
15 | 15 | - Select the `test-cli-app` Gradle project and click `OK`
|
16 |
| -  |
| 16 | + -  |
17 | 17 | - Next configure the path to the Android NDK. This allows compilation and debugging of the native code (the runtime contains predominantly C++ code). `File -> Project Structure...` (`Ctrl+Alt+Shift+S`)
|
18 |
| -  |
| 18 | + -  |
19 | 19 | - Set the Android NDK location to point to your `12b` extracted NDK package on a hard drive. If prompted - **Do not** install latest NDK.
|
20 |
| -  |
| 20 | + -  |
21 | 21 |
|
22 | 22 | ## Configuring the project
|
23 | 23 | - Build a NativeScript application using the CLI (`tns build android`)
|
24 | 24 | - Navigate to `my-app/platforms/android/`, copy the `src` directory to `test-cli-app/app/`
|
25 | 25 | - Align the `model.android.compileSdkVersion` to match the one used when building your project (default - highest installed, or one passed with the `--compileSdk` flag)
|
26 |
| -  |
| 26 | + -  |
27 | 27 | - Align the support library versions so that the big version (first number) matches that of the compileSdk
|
28 |
| -  |
| 28 | + -  |
29 | 29 | - > **IMPORTANT**: If the project refers to any gradle plugins (additional support library plugins, sidedrawers, design library, google play libraries, 3rd party libraries etc.) either in `my-app/app/app.gradle`, or in any of the nativescript plugins installed in the application, those references will need to be included manually in the `test-cli-app/app/build.gradle` file's `dependencies` scope.
|
30 | 30 |
|
31 | 31 | - Illustration of the above: using the `nativescript-drawingpad` in a project, it is required to refer the jcenter `"com.github.gcacace:signature-pad"` package:
|
32 |
| -  |
| 32 | + -  |
33 | 33 | - Build the entire project to ensure everything is setup properly, and the runtime is ready to be debugged - `Build -> Rebuild Project`
|
34 | 34 |
|
35 | 35 |
|
36 | 36 | ## Configuring debug symbols for debugging C++ code
|
37 | 37 | - **Note:** The following needs to be done only once. The paths to the binary directories are stored locally. Add the necessary symbols that will allow your applications to break in native (C++) code
|
38 | 38 | - Click on the `app` project -> `Edit Configurations`...
|
39 |
| -  |
| 39 | + -  |
40 | 40 | - On the settings window that opens up click on the `Debugger` tab
|
41 |
| -  |
| 41 | + -  |
42 | 42 | - Click the `+` (plus) button and proceed by adding the directories with the symbol tables for x86 and armeabi-v7a ABIs. This will ensure that whether the application debugged is an x86 emulator, or an armeabi-v7a device, C++ breakpoints will be hit.
|
43 |
| -  |
| 43 | + -  |
44 | 44 | - Ultimately the `Debugger/Symbol Directories` tab should end up looking like this:
|
45 |
| -  |
| 45 | + -  |
46 | 46 |
|
47 | 47 |
|
48 | 48 |
|
|
0 commit comments