简体   繁体   中英

Open Android library located in subfolder in Eclipse

Many Android libraries are distributed using a similar structure as follows:

mycustomlib/
-->lib/ (where the "real" code lives)
---->src/
-->samples/
-->tests/

I want to import the library to Eclipse, but I cant import the whole mycustomlib folder because it has no AndroidManifest.xml file (I suppose this is the reason). I only can import the lib folder. Apparently works, but the project name in Eclipse becomes lib .

Is there any way to put mycustomlib in the project name without messing the tree structure so I can pull git changes normally?

My reason to want to do this: If I keep a generic name as lib as the project name, this would confuse the management of multiple projects in the same workspace.

为什么必须导入所有mycustomlib ,为什么只导入libsample ,修改并拉到原始git

You can rename the project inside Eclipse (by clicking on the project and pressing F2).

It will change a Eclipse-specific file called .project (it will not rename the folder). Since many projects don't have this file or not modify it, there is no problem in changing it. At worst, just do the merge manually to any changes in the file.

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