0

I have a pom.xml for my android application. Now i want to add a new depedency through maven.

I have added a dependency like this

<dependency>
    <groupId>com.commonlib</groupId>
    <artifactId>commonlib</artifactId>
    <version>8.4.22</version>
</dependency>

Now the code is very well compiled and built an apk. I run maven clean install command. But when i run the application NoClassDefFoundError comes for the class.

My question do i have to do anything else apart from adding the depdency in pom. xml

cheers, Sayrav

mehdi lotfi
  • 11,194
  • 18
  • 82
  • 128
saurav
  • 5,388
  • 10
  • 56
  • 101

2 Answers2

0

Make sure that you do not use Pro guard, if you want to use it edit proguard.cfg file. To disable Pro guard go to Project Structure (on mac cmd + ;) --> select your module --> select proguard Tab --> Click disable

Hope that help.

molu2008
  • 1,237
  • 2
  • 15
  • 20
0

You sure you have correct library name? I cannot see it on sonatype public https://oss.sonatype.org/content/groups/public/com/

peter_budo
  • 1,748
  • 4
  • 26
  • 48
  • Hi Peter thanks for the reply...i use it from our private nexus repo and its available :) – saurav Aug 05 '14 at 11:08
  • Without being able to see your build it is hard to judge. I suggest you to have look on this article and see if it helps http://javarevisited.blogspot.co.uk/2011/06/noclassdeffounderror-exception-in.html – peter_budo Aug 05 '14 at 16:00