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.
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
Related
I have a problem and I would like your help :)
I received a native Java project from Android Studio and I want to know how I can configure my environment, the first time I tried I had a lot of errors with gradel.
Is there a way to know exactly what settings are needed to start project maintenance?
As long as you have installed Android Studio and are able to create sample projects, you should be set up.
Gradle should show you all the problems which your legacy project has. I assume, that you will see a lot of warnings which can be ignored at first.
You might have problems with a missing key.properties file.
Some dependencies might not be available anymore.
You have to resolve all the issues manually. There aren't any special settings.
I have inherited an unfinished Android App project from a client. There is a lot of work to be done fixing it up, but I cannot even figure out how to build the project! There is no build.xml file, so I don't think they used ANT to build. How can I find out how to build this existing project?
There is a working APK in the project, so it had to have been built successfully at some point.
Thanks for the input guys. I am used to doing everything via command line because I'm not a huge fan of Eclipse. Turns out that the original developers of this app were actually using a different IDE called IntelliJ. I have not gotten the app to compile yet but I am now on the right track.
Just a quick question I did not find a good answer on. We are currently working on an APP created with Eclipse ADT Bundle. I recently started exploring Android Studio, and like it. Is it possible to still collaborate with my mates using Eclipse with a shared GitHub repo?
I noticed Android Studio converts the project to its own file structure, so I guess this does not go well with Eclipse, and the repo.
Is there any solutions for this? So I can keep developing in Android Studio, push to GitHub, while the rest of the team use Eclipse?
I think you can do it, you'll just have to explicitly define a sourceSet that matches the Eclipse structure. If you use any other build variants, they can't have any sourceSets because you wouldn't be able to check those files in to source control. However, there are several useful things you can do with build variants just with the build file. I think you can check in the build.gradle and other gradle stuff and it won't mess up your coworkers.
It may seem like a dumb question but when I add a maven dependecy in the gradle build file it gets resolved fine and everything works fine. However I dont get the dependency source code or javadocs even though those are available in maven repo and if i create an identical project with same deps in maven i get the source. I am using the latest version of AndroidStudio but I cant seem to find a way to make it work. This seems like a major feature and its definitely a deal braker for me (if i dont find a resolution I will just keep using maven and Intellij instead, since that works fine). Have you encountered a similar issue. I google a lot but all the fixes I saw were mostly patches or advised on downloading the source jars, etc. What's the point of downloading those manually if I were to use a dependency manager...? Any ideas will be highly appreciate, I am sure that someone here faced this same issue when they moved to gradle/Android Studio...
I'm trying to set up a project with dependencies on ActionBarSherlock (4.0 RC1) and ViewPagerIndicator, I'm currently using Eclipse IDE, and I would like to be able to build and run an Android test project for this project. I had tell Eclipse to ignore the proguard and generate-sources goals to get it to stop giving me errors, it seems that was the solution for it, but I'm having a hard time confirming if that is still the correct solution. I've had moderate success with ABS thus far, I was able to deploy a package to the emulator that had an action bar, and Eclipse seems to know about the classes and resources in ABS. However, it doesn't know about the themes (like Theme.Sherlock.Light) and displays an error. I'm okay with that, except it means I can't run using Eclipse. But it doesn't seem to work for ViewPagerIndicator. And I keep running into random errors and it feels like I'm just running around in a circle.
So I tried adding a test project (again..), so that I can test the project as I build it, to make sure it meets all my specifications at each step. But I can't seem to get that to work. If I could just get these 3 things and how to run the tests I should be able to debug other problems that are arising, but as it is now I can't even confirm where the problems lie. Most of my researching has yielded partial answers and out-of-date solutions.
Using:
ActionBarSherlock 4.0 RC1
ViewPagerIndicator 2.2.3
android-maven-plugin 3.1.1.99.0.6
Apache Maven 3.0.3
Eclipse Indigo
m2e 1.0.100.20110804-1717
I also posted this question on the maven-android-plugin Google group, and Manfred Moser pointed me to Gaug.es app for Android. It has a set up for building the app with Maven, and has dependencies for ABS, ViewPagerIndicator, RoboGuice, Robotium, and a few others. It is set up to do unit tests with surefire and integration tests with instrumentation.
He also mentioned that he uses IntelliJ IDEA, which I thought I would try for myself (since Eclipse was giving me issues and TextMate is not even an IDE). The Community Edition has been serving well so far,it provides nicer (or easier to understand) integration with ant and maven, so I can specify my "clean package android:deploy" run configuration, for example.
If you're having similar issues, I would recommend taking a look at Gaug.es, it can be a little overbearing and do more than you want or should start off with. I can post the details of what I gathered from Gaug.es for my own app if anyone else is curious, but I thought I would note that my question is currently resolved, and how it was resolved.