Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2212] 5.2.0 not compiling CommonJS modules

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsandroid
ReporterFlavio Lacerda
AssigneeUnknown
Created2016-03-24T18:59:02.000+0000
Updated2018-03-06T18:52:38.000+0000

Description

Attached testmodule Does not compile and show this error: [javac] Compiling 3 source files to /Users/flaviolacer/Documents/Appcelerator_Studio_Workspace/testmodule/android/build/classes [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6 [javac] /Users/flaviolacer/Documents/Appcelerator_Studio_Workspace/testmodule/android/build/generated/java/CommonJsSourceProvider.java:26: error: cannot access AssetCryptImpl [javac] AssetCryptImpl source = new AssetCryptImpl(); [javac] ^ [javac] bad source file: /Users/flaviolacer/Documents/Appcelerator_Studio_Workspace/testmodule/android/build/generated/java/testmodule/module/AssetCryptImpl.java [javac] file does not contain class testmodule.module.AssetCryptImpl [javac] Please remove or make sure it appears in the correct subdirectory of the sourcepath. [javac] 1 error

Attachments

FileDateSize
testmodule.zip2016-03-24T18:53:47.000+00005272092

Comments

  1. Sharif AbuDarda 2016-03-24

    Hello, Please provide a complete set to steps to follow for us to test in our environment. Maybe your module needs to be built in Android platform for it to work with Appcelerator. Please follow the guide here http://docs.appcelerator.com/platform/latest/#!/guide/Android_Module_Quick_Start for Android module development. Thanks.
  2. Flavio Lacerda 2016-03-24

    I created a basic module, compiled and works fine. Inserted a class in js (in assets) and stopped to compile. Open the zip attached and try to compile. Regards.
  3. Sharif AbuDarda 2016-03-25

    Hello, When you include a common js file in asset folder you need to add CommonJsSourceProvider.java to recognize the asset. For example, see the link here https://github.com/xissy/titanium-mobile-sdk/blob/master/module/android/generated/CommonJsSourceProvider.java Thanks.
  4. Flavio Lacerda 2016-03-26

    Hi, I'dont know what you are talking about. If you include an common js you have to add CommonJsSourceProvider.java to recognize the asset? This is not right because the "generated" directory is automatically generated. Did you tried to compile my example? This started to happen when i updated the sdk to 5.2.0. I created a new one and seems to be a problem with the sdk. Please, compile and you will see the error. Regards.

JSON Source