Cannot get module to work in Titanium Alloy JS

六眼飞鱼酱① 提交于 2019-12-13 01:09:37

问题


I've tried to add the TiSocial.Framework module into Titanium Alloy, and after reading several guides and questions, I still can't get it to work. What am I doing wrong?

Here are the steps I took:

  1. Copied the unzipped module files into modules/iphone/TiSocial.Framework-master
  2. Edited the TiApp.xml file with: <module platform="iphone">TiSocial.Framework-master</module>
  3. Cleaned the build tried to run the app.

But I get the following error(s):

Could not find Titanium module id=TiSocial.Framework-master version=latest platform=iphone deploy-type=development

Could not find all required Titanium Modules: id: TiSocial.Framework-master version: latest platform: iphone deploy-type: development

I can't spot where I'm going wrong, in my TiApp.xml Overview screen, I the module appears to be installed just fine (see picture):

My addition to TiApp.xml looks like this:

<modules>
    <module platform="iphone">TiSocial.Framework-master</module>
</modules>

I also tried doing the same as above but changing the name of the module, to dk.napp.social, because in the README on their GitHub account, it says to reference that in the TiApp.xml. So I tried that but it still didn't work.


回答1:


TiSocial.Framework-master is not the name of the module, also you are not supposed to unzip the entire module plus souurce code and documentation into your modules/ folder, you ONLY want the compiled module binary.

Instead do this:

  1. Inside Titanium Studio goto "Help->Install Mobile Module"
  2. Enter this url: https://github.com/viezel/TiSocial.Framework/blob/master/dist/dk.napp.social-iphone-1.7.3.zip?raw=true
  3. Choose your project, hit ok, and it should be installed now.


来源:https://stackoverflow.com/questions/22771409/cannot-get-module-to-work-in-titanium-alloy-js

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