Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated getting help link

...

Excerpt

[ERROR] No app.js found. Ensure the app.js file exists in your project's Resources directory.

If part of the contents of your Resources folder were deleted, run  alloy compile --config platform=<platform> to regenerate the missing files.

Android: Images, HTML pages and other assets do not display

If assets are being displayed for iOS and Mobile Web applications and not Android applications, the path to the asset needs to be preceded by a slash ('/'). The iOS and Mobile Web platform can accept relative and absolute paths, but the Android platform requires an absolute path.

Android Runtime Error: Uncaught TypeError: Cannot call method xxx of undefined

1. You might be trying to create an iOS-only Titanium object. Use the platform attribute in the view to enforce platform-specific objects.
2. If the top-level UI component in your view has an assigned ID, that is, the id attribute in the XML markup is defined for that component, the controller cannot use $.<controller_name> to reference it. It needs to use the assigned ID.

Android Runtime Error: Uncaught ReferenceError: Alloy is not defined

Non-controller JavaScript files are not automatically wrapped by Alloy. You need to require the 'alloy' module. See Library Code for more information.

iOS Application Error: invalid method (xxx) passed to UIModule (unknown file).

You might be trying to create an Android-only Titanium object. Use the platform attribute in the view to enforce platform-specific objects.

iOS Application Error: undefined is not an object (evaluating $.xxx.open) (unknown file).

If the top-level UI component in your view has an assigned ID, that is, the id attribute in the XML markup is defined for that component, the controller cannot use $.<controller_name> to reference it. It needs to use the assigned ID.

Mobile Web: Changes to code do not take effect

Mobile Web applications cannot be built in Studio, since Mobile Web does not support compiler plugins. If you are building a Mobile Web application using Alloy, you need to compile the code using the Alloy command-line interface:

Code Block
$ alloy compile --config platform=mobileweb 

Mobile Web: [ERROR]  alloy run not supported by mobileweb

Mobile Web applications cannot run from the command-line interface. Run the program from Studio.

Studio: Unable to find alloy binary

There was probably an issue installing Alloy with Studio or the alloy binary is not in your PATH. Check to see if alloy is installed and is in your PATH (usually in '/usr/local/bin') or follow the Manual Installation instructions  to install it.

Getting help

Use the Titanium Community Questions and Answers Forum to receive assistance from Titanium Community members or find an answer to a previously answered question.  Enter 'alloy' as a tag and include the Alloy version as part of the platform information included in the question.  To get the Alloy version, run the alloy --version command in a console.

...