简体   繁体   中英

Android External library path

I am using a external library in my project. in my current java build path library path shows as C:/xxx/xxx/Github/MyProject/libraryOne/libs . As, I am not the only one developer,other people that might work with the code. So, I want make it like

../libraryOne/libs

I think, the first one will not work in other platform, right ? So, How can I do that and what will be the best solution for me ?

Its not a matter of platform. It is matter of different machine. The first path is hard coded and the C: in other developer's machine is not the same as your C:. Thus, the system would not be able to traverse to the right folder when they run it on their machine. The second way to write the path is good, assuming that MyProject folder has the project that you are working on. Thus, when the other developer start using MyProject, they would automatically have the folder libs.

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