Can't see titanium module in the list even after successful installation

て烟熏妆下的殇ゞ 提交于 2019-12-24 11:21:39

问题


I am on a Mac Machine I have installed module but while adding from tiapp.xml the module is not showing the list. Can anyone help on this problem. Thanks in advance.


回答1:


There are a couple of ways to install a module.

1) The first way you mentioned by going into Studio. Help > Install Mobile Module. A module dialog will pop up, enter the URL of the module's ZIP file, or click Browse and locate the ZIP file using finder.

2) If you are having trouble you can install it manually by unzipping the module and placing it in your Mac's library folder.

On Mac OS X 10.7 > the Library folder is hidden, to show it in terminal run.

chflags nohidden ~/Library/

Then place the module in

~/Library/Application Support/Titanium/modules/

You'll get a choice of a few folders now - Android or iPhone place this in the corresponding folder to what the module was built for.

Now you've added it you need to configure your app to include the module in your project

If you are entering it manually, go into the tiapp.xml and add the following with the modules unique name and version.

<modules>
  <module version="$MODULE_VERSION">$MODULE_ID</module>
</modules>

or use studio's Overview tab for the tiapp.xml to do this for you, go to the modules section and click the green add ( + ) button. The select the desired module from the list.

If the module doesn't show up -

  • Make sure you are including the build version of the module, in a lot of repos this will be found in the Dist folder.

  • Check the name and version number of the module in the tiapp.xml file.

  • Make sure that the version of the module is installed either locally or globally.

  • You can also remove the version attribute from the module element to use the most recent version of the module.

Using the module - Once installed you can access your module and all it's methods via instantiating the module with a require.

var Module = require('$MODULE_ID');

More information can be seen here in the Appcelerator docs. http://docs.appcelerator.com/titanium/3.0/#!/guide/Using_a_Module



来源:https://stackoverflow.com/questions/28185440/cant-see-titanium-module-in-the-list-even-after-successful-installation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!