Building an Android Project with Ant/Ivy
Asked Answered
B

1

5

I am currently working on a growing Android project. In order to freeze "Jar Hell" in its tracks I am trying to set up Ivy with Ant to manage dependencies. I have built an ivy.xml file that successfully retrieves all of it's dependencies when called. After doing this I installed the Eclipse IvyDE plugin in order to use the ivy.xml with my current project. All the dependencies show up in Eclipse and when I go to the build path they are there. When I click "Run as android application" everything builds. When the app loads (in either an emulator or an actual phone) it immediately crashes on startup. From what I can tell the dependencies are not being compiled with my app. Eclipse itself seems to be aware of the dependencies because it does not produce any error messages.

So... Can anyone point me in the right direction to solve this problem? Is there something I am misunderstanding about Ivy or the IvyDE Plugin? Thanks!

I have also looked at this question Add Ivy managed dependencies to Android build path where the asker seemed to be having the same problem. I am using the most current version of all tools involved.

Bambi answered 24/5, 2012 at 22:3 Comment(0)
B
13

Although no one responded to this I figured I would answer it to show any other lost googlers what I have done. It turned out my problem was related to how I had ivysettings.xml set up. I was misunderstanding the way that retrieve pattern works. Fortunately, I found this project on GitHub which demonstrates how to use Ivy with an Android project. This example project provided a solid foundation for me to work with I hope it can help you too.

https://github.com/h8/IvyAndroidExample

Bambi answered 29/5, 2012 at 21:37 Comment(2)
it seems to retrieve data to ivy cache - but when i build without adt but with ant build.xml application crashes not seeing the ivy provided libs. building with adt works fine.Pyrometallurgy
i must retrieve into the libs directory then it works. When building with ADT it suffices to add ivy managed dependency to classpath and then just resolve without retireving. So i get mismatchwhen trie build with ant the project managed with adt.Pyrometallurgy

© 2022 - 2024 — McMap. All rights reserved.