Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5877] Unable to compile Ti-SDK with scons.js

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDone
Resolution Date2018-12-10T16:45:03.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
LabelsAndroid, iOS,
ReporterJonas Funk Johannessen
AssigneeShak Hossain
Created2018-09-05T13:00:42.000+0000
Updated2018-12-10T16:48:40.000+0000

Description

Following the guide here [https://www.appcelerator.com/blog/2018/06/patch-titanium-sdk-using-cherry-picking/](https://www.appcelerator.com/blog/2018/06/patch-titanium-sdk-using-cherry-picking/), I'm getting an error when running the last command node scons.js cleanbuild. The error I see is: {panel:borderStyle=dashed} BUILD SUCCESSFUL Total time: 2 seconds path.js:28 throw new TypeError('Path must be a string. Received ' + inspect(path)); ^ TypeError: Path must be a string. Received null at assertPath (path.js:28:11) at Object.join (path.js:1246:7) at AndroidSDK.getPlatformDir (/Users/jonasfunk/Dropbox/Appcelerator_Studio_Workspace/ti-sdk/build/androidsdk.js:64:24) at Android.build (/Users/jonasfunk/Dropbox/Appcelerator_Studio_Workspace/ti-sdk/build/android.js:41:28) at /Users/jonasfunk/Dropbox/Appcelerator_Studio_Workspace/ti-sdk/build/scons-cleanbuild.js:95:26 at /Users/jonasfunk/Dropbox/Appcelerator_Studio_Workspace/ti-sdk/node_modules/async/dist/async.js:3047:16 at replenish (/Users/jonasfunk/Dropbox/Appcelerator_Studio_Workspace/ti-sdk/node_modules/async/dist/async.js:982:17) at /Users/jonasfunk/Dropbox/Appcelerator_Studio_Workspace/ti-sdk/node_modules/async/dist/async.js:986:9 at eachLimit$1 (/Users/jonasfunk/Dropbox/Appcelerator_Studio_Workspace/ti-sdk/node_modules/async/dist/async.js:3133:22) at Object. (/Users/jonasfunk/Dropbox/Appcelerator_Studio_Workspace/ti-sdk/node_modules/async/dist/async.js:1016:16) {panel} Node/NDK installed: {panel:borderStyle=dashed} ✓ node installed (v8.9.4) ✓ npm installed (v6.4.1) ✓ ndk installed (12.1.2977051) ✓ ndk-build installed (/Users/jonasfunk/android-ndk-r12b/ndk-build) {panel}

Comments

  1. Hans Knöchel 2018-09-05

    It looks like, although installed, the NDK path may not be known by the CLI. Make sure to set it in the Ti config (either via CLI with ti config android or by editing ~/.titanium/config.json), e.g.:
       	"android": {
       		"sdkPath": "/opt/android-sdk/",
       		"ndkPath": "/opt/android-sdk/ndk-bundle"
       	},
       
  2. Jonas Funk Johannessen 2018-09-05

    Thanks for the feedback. Should note, that I just updated the NDK to r17b, as someone suggested that on TiSlack. Had unsuccessfully tried with r12b before that. Tried setting the NDK path again, via appc ti setup. Checked ~/.titanium/config.json, and it seems correct:
       "android": {
       		"sdkPath": "/Users/jonasfunk/android-sdk",
       		"ndkPath": "/Users/jonasfunk/android-ndk-r17b",
       	}
       
    Still no luck - same error.
  3. Jan Vennemann 2018-10-19

    Make sure you have the required environment variables set. The scripts uses ANDROID_SDK to detect your Android SDK. For example, if you only have ANDROID_HOME set, run ANDROID_SDK=$ANDROID_HOME ./scons.js cleanbuild (or define ANDROID_SDK in your bash profile).
  4. Sharif AbuDarda 2018-11-29

    Hello, [~jonasfunk], please follow up on the status of your issue? Did you tried following Jan's guide? Thanks.
  5. Jonas Funk Johannessen 2018-12-03

    Environment variables has been set so that's not the issue. I haven't tried building since October, as the issue I wanted to fix, has later been fixed by an SDK update.
  6. Jan Vennemann 2018-12-03

    Good to hear you got the fix. For future reference, it may still have been an issue with environment variables. I had a mixup in my previous comment and updated it accordingly.

JSON Source