0

I was developing an android app (using Eclipse, not Studio) following some example, which makes use of Github/CircleImageView. Hence, I wanted to compile that first into a jar library.

So on my Linux machine I installed gradle and since its my first time with gradle, I followed the tutorial on gradle. So, in the root directory of the project ~/Downloads/CircleImageView-master/, I :

  1. Run gradle wrapper. Got Build Success
  2. Run ./gradlew build, gives the following error

    CircleImageView.java:21: error: package com.nineoldandroids.animation does not exist

    import com.nineoldandroids.animation.ObjectAnimator;

Though, I can see that there is one jar file in the project ~/Downloads/CircleImageView-master/circleimageview/libs/nineoldandroid-library-2.4.0.jar. Can anyone please help in resolving the issue. I am trying since past 10 hours and reached so far here after resolving all the issues, and stuck just at the last point.

I opened the jar in a package manager and the required classes are there, including ObjectAnimator.

Naveen
  • 7,944
  • 12
  • 78
  • 165
  • Why did you clone the project? You can include the library with `compile 'com.alexzh:circleimageview:1.2.0'` – OneCricketeer Aug 14 '16 at 17:41
  • @cricket_007 : I am using Eclipse for development (not Studio, else it would have been straightforward, perhaps). I also asked the question : http://stackoverflow.com/questions/38940391/android-eclipse-how-to-resolve-third-party-library-dependencies-corresponding and after searching a lot for hours, I thought of compiling using gradle, as the last option. So far, I got success with gradle compilation also, but it seems gradle is not able to see the package `com.nineoldandroids.animation` which is present there. Where gradle searches for libs? – Naveen Aug 14 '16 at 17:46
  • I think that library is deprecated, last time I checked. If you see the jar file, then that's how Gradle searches. Anyways, Eclipse Neon has Gradle support, so you could still use that line, if you feel like converting your project – OneCricketeer Aug 14 '16 at 17:51
  • I could be wrong about this, but most libraries, you'll probably want an AAR file, not just a JAR file. The AAR includes additional android specific resources – OneCricketeer Aug 14 '16 at 17:56
  • @cricket_007 : Thanks. Basically why all this mess is because I am trying to run an Android Studio Project into Eclipse. But it seems its not possible : http://stackoverflow.com/questions/16745793/how-do-you-open-an-android-studio-project-in-eclipse. The answer there is 3 years old, though. – Naveen Aug 14 '16 at 18:03
  • You could try using "Andmore", or you could just get Android Studio... Eclipse does support Gradle now (you might have up update Eclipse) – OneCricketeer Aug 14 '16 at 18:19

0 Answers0