简体   繁体   English

在Titanium中导入JAR文件

[英]Importing JAR file in Titanium

I have created titanium mobile module project and copied .zip file to /lib folder and added entry to classpath. 我已经创建了Titan移动模块项目,并将.zip文件复制到/ lib文件夹,并将条目添加到classpath。 What are the next things I have to do So that I can access the method from JAR file. 接下来要做的是什么,以便可以从JAR文件访问该方法。 And in which file I should write code for making the use of methods of JARs. 我应该在哪个文件中编写代码来使用JAR方法。

you need to copy zip file in root folder of your titanium project not the lib folder. 您需要将zip文件复制到Titan项目的根文件夹中,而不是lib文件夹中。 When you will run the project it will be uncompressed and it will make modules folder in root folder. 当您运行该项目时,该项目将被解压缩,并将模块文件夹放在根文件夹中。 You should have an entry in TiApp.xml file something like this: 您应该在TiApp.xml文件中有一个类似于以下内容的条目:

<modules>
    <module>
        com.test.module
    </module>
</modules>

and if you find folder "yourprojectdirectory->modules->android->com.test.module" then I think everything is ok.... 如果您找到文件夹“ yourprojectdirectory-> modules-> android-> com.test.module”,那么我认为一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM