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...
Related
Hi everyone,
I'm trying to implement a swipelistview into an android project with Android Studio, of course i'm using gradle, so i try to download the library from a repository, some odd things I realised so far:
The git repository of 47deg/swipelistview is no longer working. (404)
Also the repository from where gradle tries to download the library is no longer accessible 'http://clinker.47deg.com/nexus/content/groups/public'
The project worked like a charm just one week ago, I have an APK witch is deployed in my phone and i'm looking to it as am writing this question.
This happened days ago when I tried to open the project to do some enhancement to the app, nothing related to the swipelistview thought. And when I try to build Android studio says Cannot resolve
com.fortysevendeg.swipelistview:swipelistview:1.0-SNAPSHOT#aar
I tried removing snapshot#aar, changing version of swipelistview... no result.
Question:
Is there a problem with the repository I'm trying to download from?
If not, what are other libraries that can replace the swipelistview library?
I also checked all the related stackoverflow questions, I updated my Android Studio, changed version of gradle, tried to find a Jar of the library, but all of this without any positive result.
Thanks in advance for any efforts you put in this thread. I'm available for any clarifications.
Last days I've been trying to create a simple app for Android using Maven and Jersey to connect to my local RESTful service.
First, I created a local client with use of Maven and it worked. Then, I ported it to an Android device and here comes the thing: it throws exceptions.
First of all, there's this issue: https://code.google.com/p/maven-android-plugin/issues/detail?id=97 which was supposed to be fixed with 3.2.1 plugin version. However, I've updated my version to such and the problem still apprears. I tried many newer versions, but the same story there. Cleaning project, restarting IDE, uninstalling application - nothing helps. Had any of you a similar problem?
All files in META-INF-folders are ignored by JavaResourceFilter which is used by ApkBuilder.
The only way to include these files into your apk is to put them there after packaging. so if maven doesn't do it you'll have to take care yourself.
I just did a little customization to build.xml in android-sdk and it works well.
See my post.
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
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.
I've recently been trying to setup maven for building my android projects, using the maven-android-plugin.
Whilst this is a good exercise, I'm not convinced that the benefits will outweigh the frustration in getting it working.
Can anyone give me some pros/cons on using Maven for android? I'm not looking for subjective answers, but the facts on whether its worth the effort.
Regards
Well maven is worth it if you are developing a j2ee application to save you from the jar hell
when using external apis
So if you are not going to use the maven repositories its not worth it.
I hate maven because of the problems you already mentioned. But it saves a lot time if you need xy jars. Im currently developing a eclipse plugin which can download required jars and dependencies form maven without the maven compiler or pom files. But its far from ready
You can also create a separate maven project and include it in the android project
im not sure if it works with android but you can do it in standart jdk
Maybe the gradle makes more sense.
Google released an ide called AndroidStudio, it uses gradle. Seems like google will suggest gradle in building an Android project.
I tried to use Maven to build my android project, it's hard to use, finally I changed to gradle.
Another good answer on stackoverflow why-use-gradle-instead-of-ant-or-maven
My android app shares business objects and other functionality with my back-end server so I pulled this out into a common maven project which both the app and the server (as maven projects) have a dependency on. Maven is perfect for this sort of thing, so its helpful in this instance, but if you are writing fairly straightforward apps, I'm not sure what benefit maven would have, especially when getting the android-maven-plugin to behave took me so long.