[英]how to access library class from another android project
Hi I am working with android.I had created a library project. 嗨,我正在使用android.I创建了一个库项目。 Now I integrated it with my new app.
现在,我将其与新应用程序集成在一起。 Now how can I access the library main class to my new project ???
现在如何访问图书馆主类到我的新项目?
Its depend on your Library project. 它取决于您的图书馆项目。 How you have create it.
您如何创建它。 Mean pure java file or you have use some other resources also.
意味着纯Java文件,或者您还使用了其他资源。
Simply refer official document here. 只需在这里参考官方文件。 & Other reference link is here .
&其他参考链接在这里 。
You can use that Class using importing package , Like i have one lib and i have added as lib project and i am importing that lib package as below. 您可以使用import package来使用该Class,就像我有一个lib并且我已经添加为lib project一样,并且我正在按如下方式导入该lib包。
import chintan.khetiya.android.my_custom_lib.*;
If you have use <activity>, <service>, <receiver>, <provider>, and so on, as well as <permission>, <uses-library>,
any of these then you have to add all of these in your real project. 如果您使用过
<activity>, <service>, <receiver>, <provider>, and so on, as well as <permission>, <uses-library>,
则必须将所有这些添加到您的真实的项目。 See For More Details 查看更多详细信息
If you use eclipse; 如果您使用日食;
Right click your project in "Project Explorer" view, than open window select "Android" tab left side. 在“项目资源管理器”视图中右键单击您的项目,然后在打开的窗口左侧选择“ Android”选项卡。 At right side bottom container you will see "add button" click and select project.
在右侧底部的容器中,您将看到“添加按钮”单击并选择项目。
""Your library and project in same workspace."" “”您的库和项目在同一工作区中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.