Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20613] Android native modules build is getting failed with Android NDK r11

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-03-22T17:38:28.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.3.0
ComponentsAndroid
Labelsn/a
ReporterKondal Kolipaka
AssigneeChris Barber
Created2016-03-22T06:30:28.000+0000
Updated2016-05-31T12:22:01.000+0000

Description

Android native modules build is checking for a release.txt file to validate the Android NDK directory, but with the android NDK r11, release.txt file is removed. https://github.com/appcelerator/titanium_mobile/blob/master/node_modules/titanium-sdk/lib/android.js#L927 Here is the log:
kondals-MacBook-Pro:module4 kondalkolipaka$ appc run --platform android --project-dir /Users/kondalkolipaka/development/workspaces/runtime-Titanium-360/module4/android --build-only
Appcelerator Command-Line Interface, version 5.2.1-12
Copyright (c) 2014-2016, Appcelerator, Inc.  All Rights Reserved.
 
3/18/2016, 2:39:42 PM
 
Operating System
  Name                        = Mac OS X
  Version                     = 10.11
  Architecture                = 64bit
  # CPUs                      = 8
  Memory                      = 17179869184
 
Node.js
  Node.js Version             = 4.2.2
  npm Version                 = 2.14.7
 
Titanium CLI
  CLI Version                 = 5.0.6
 
Titanium SDK
  SDK Version                 = 5.3.0.v20160317110758
  SDK Path                    = /Users/kondalkolipaka/Library/Application Support/Titanium/mobilesdk/osx/5.3.0.v20160317110758
  Target Platform             = android
 
Command
  /usr/local/bin/node /Users/kondalkolipaka/.appcelerator/install/5.2.1-12/package/node_modules/titanium/lib/titanium.js build run --platform android --project-dir /Users/kondalkolipaka/development/workspaces/runtime-Titanium-360/module4/android --config-file /var/folders/9n/xpk1tm596cbctmwyfhcqysfw0000gn/T/build-1458283177511.json --log-level info --no-banner --project-dir /Users/kondalkolipaka/development/workspaces/runtime-Titanium-360/module4/android
 

2016-03-18T06:39:42.984Z | ERROR  | An uncaught exception was thrown!
Cannot read property 'path' of null
2016-03-18T06:39:42.986Z | ERROR  | Cannot read property 'path' of null
*Workaround*: Manually create a release.txt file in the NDK home directory and run the build. Studio checks for ndk-build , ndk-gdb , build , prebuilt , platforms files/folders to validate the NDK. How about using the same here ?

Comments

  1. Chris Barber 2016-03-22

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/7873 5_3_X PR: https://github.com/appcelerator/titanium_mobile/pull/7874
  2. Chris Barber 2016-03-22

    To test, just run ti info -t android -o json and locate the ndk section. You can try with no NDKs, 1 NDK, or several NDKs. Note that if you have more than 1 NDK installed, it will only show the first NDK it found. I should point out that there was a bug where if you didn't have the android.ndkPath set, you didn't have the ANDROID_NDK environment variable set, and if the ndk-build executable was not in the system PATH, then it would scan /opt, /opt/local, /usr, /usr/local, and ~ looking for an Android SDK instead of and NDK. Whoops!
  3. Feon Sua Xin Miao 2016-03-22

    PRs merged.
  4. Lokesh Choudhary 2016-04-06

    Verified the fix. The CLI now detects NDK r11c & the modules are built successfully. Environment: Appc Studio : 4.6.0.201604041329 Ti SDK : 5.3.0.v20160404105211 Ti CLI : 5.0.7 Alloy : 1.8.5 MAC El Capitan : 10.11.4 Appc NPM : 4.2.5-2 Appc CLI : 5.3.0-12 Node: 4.2.2
  5. Liam Potter 2016-05-31

  6. Feon Sua Xin Miao 2016-05-31

    [~evo], you are using Titanium SDK version 5.1.1.GA, the fix will be available in Titanium SDK version 5.3.0.GA.

JSON Source