Search code examples
androidtitaniumappceleratorappcelerator-titanium

Titanium does not compile Android app (Cannot read property 'sdks' of undefined)


I am trying to build my Android mobile app.

I have used the following command:

$ appc ti build -p android

However, it bizzarely gives me the following error:

Appcelerator Command-Line Interface, version 6.2.2
Copyright (c) 2014-2017, Appcelerator, Inc.  All Rights Reserved.

An uncaught exception was thrown!
Cannot read property 'sdks' of undefined
Cannot read property 'sdks' of undefined

What is going on and how do I fix this issue.


Solution

  • This is bug in Titanium cli: https://jira.appcelerator.org/browse/TIMOB-24751

    You can fix this by installing windows sdk or patching the bug your self. Edit file C:\ProgramData\Titanium\mobilesdk\win32\6.1.0.GA\windows\cli\commands\_build\config.wpSDK.js

    Add the fix from this pull request https://github.com/appcelerator/titanium_mobile_windows/pull/1006/files