Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Alloy Project: Requiring CommonJS module does not work with Android 4 (but does with Android 2)

$
0
0

Hi, we have a 3.1.2.GA Alloy project with some methods defined in a regular CommonJS module which is located in: /app/lib/androidNavbar.js

The module is required using the following code:

if (OS_ANDROID)
{
    var navbar = require("/androidNavbar");
    ...
}
This works fine on Android 2.3.3 devices, however it shows an error on Android 4 devices (hardware as well as emulator): Message: Uncaught Error: Requested module not found: /androidNavbar

Console output of emulator:

[ERROR][TiExceptionHandler( 1108)] (main) [1495,1495] ----- Titanium Javascript Runtime Error -----
[ERROR][TiExceptionHandler( 1108)] (main) [1,1496] - In ti:/module.js:280,9
[ERROR][TiExceptionHandler( 1108)] (main) [2,1498] - Message: Uncaught Error: Requested module not found: /androidNavbar
[ERROR][TiExceptionHandler( 1108)] (main) [19,1517] - Source:       throw new Error("Requested module not found: " + request);
[ERROR][V8Exception( 1108)] Exception occurred at ti:/module.js:280: Uncaught Error: Requested module not found: /androidNavbar
Are we doing something wrong (what?), or is this a bug? Thank you!

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>