简体   繁体   中英

how to access library class from another android project

Hi I am working with android.I had created a library project. 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.

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 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. See For More Details

If you use eclipse;

Right click your project in "Project Explorer" view, than open window select "Android" tab left side. At right side bottom container you will see "add button" click and select project.

""Your library and project in same workspace.""

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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