[AC-5877] Unable to compile Ti-SDK with scons.js
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Done |
Resolution Date | 2018-12-10T16:45:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | Android, iOS, |
Reporter | Jonas Funk Johannessen |
Assignee | Shak Hossain |
Created | 2018-09-05T13:00:42.000+0000 |
Updated | 2018-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 (/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}
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.
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.: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:Still no luck - same error.
Make sure you have the required environment variables set. The scripts uses
ANDROID_SDK
to detect your Android SDK. For example, if you only haveANDROID_HOME
set, runANDROID_SDK=$ANDROID_HOME ./scons.js cleanbuild
(or define ANDROID_SDK in your bash profile).Hello, [~jonasfunk], please follow up on the status of your issue? Did you tried following Jan's guide? Thanks.
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.
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.