Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27798

Android: Module build should auto-download NDK if not installed


    • Story Points:
    • Sprint:
      2020 Sprint 5, 2020 Sprint 8, 2020 Sprint 9


      Google's gradle tool supports downloading the Android NDK for C/C++ builds. Titanium's module build system should automatically download the NDK in case it's not already installed. This will help reduce tech-support issues.

      Recommended Solution:
      When we upgrade the Android gradle plugin to v3.6.0 or higher, we can specify the exact NDK version we want to download in the build.gradle as follows.

      android {
      	ndkVersion "major.minor.build"

      We should do the above if the CLI fails to find the Android NDK path in our _buildModule.js script. In this case, we should also omit the NDK path from the gradle local.properties file here.

      Research Results:
      Using android.ndkVersion to download a specific version (as noted above) appears to be unreliable.

      Attempting to set this to NDK version 19.2.5345600 causes the following build error.

      No version of NDK matched the requested version 19.2.5345600. Versions available locally: 20.1.5948944

      Attempting to set this to NDK version 20.0.5594570 causes the following build error. This appears to be a recent issue.

      No version of NDK matched the requested version 20.0.5594570. Versions available locally: 20.1.5948944

      It seems like when new NDK versions get released, older NDK versions appear to stop downloading via gradle (this is speculation). Because of this, we should avoid this feature at the moment. If we don't set the NDK version in gradle, then the gradle build system will download the newest NDK version which has a minor issue noted in TIMOB-27776 but it still works.


          Issue Links



              • Assignee:
                jquick Joshua Quick
                jquick Joshua Quick
                Gary Mathews
                Sohail Saddique
              • Watchers:
                5 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration