简体   繁体   中英

How do I build my project with ANT when it depends on a non-library project with an Android library project dependency?

I'm trying to build my project using ANT. My project uses ActionbarSherlock, and Roboguice-Sherlock. ActionbarSherlock is an Android library project, but Roboguice-Sherlock is not. It's not even an Android project at all. See here:

https://github.com/rtyley/roboguice-sherlock

I can get ActionbarSherlock to build using ANT no problem, the problem lies with Roboguice-Sherlock. It's not an Android project, yet it has dependencies on Android and ActionbarSherlock, as well as Roboguice. When I try to build I get a ton of errors saying it can't find the Roboguice-Sherlock stuff.

If your project has the Roboguice .jar and the library project reference to ActionBarSherlock already configured you should be able to just drop it into your libs/ folder to have it automatically picked up.

I am working with Roberto to ensure that the .jar of his project gets uploaded to GitHub for non-Maven users to use.

For now, you can clone the project simply run mvn clean package to get a standalone .jar in the target/ folder which will enable you to do as I described above.

You need to add robiguice-sherlock as a.jar to your Android project. You can download it here (click Download (JAR) ). Trying to build the source in Android will fail because it is not an Android project. Once it is in your directory, you need to open project properties and add the.jar to your build path.

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