0

Here is error:

 java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$attr

What is the correct procedure to include a library with resources like this?

I'm trying to include android compatibility v7 library in apk. it compiles but cannot find resources at runtime. I uploaded the compatibility library to my local repo (jar file only), and included it as a maven dependency as follows:

<dependency>
  <groupId>android.support</groupId>
   <artifactId>compatibility-v13</artifactId>
  <version>23.1.0</version>
</dependency>

Is this enough to get the resources included too? It just downloads a jar which is all I uploaded to my local repo. How do I include the resources as well in the maven build? If we used the maven sdk deployer instead would including the maven dependency alone be enough? or do I need to create whole project and somehow link to library? This is being built on server so I need pom to pull everything needed. How do I get it included as library not just jar?

MuayThai
  • 441
  • 1
  • 5
  • 19
  • 1
    Possible duplicate of [Why am I still getting java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$attr?](http://stackoverflow.com/questions/30224899/why-am-i-still-getting-java-lang-noclassdeffounderror-android-support-v7-appcom) – pRaNaY Oct 22 '15 at 12:31
  • Well it might, but is including a jar file enough? What I dont understand is including a library with resources in maven build? Its being done on server. – MuayThai Oct 22 '15 at 12:37
  • So the issue is really if its a library that has XML R. etc what how do I do this. I'm on eclipse with have pop but the whole thing will be built on server. So what is procedure for including library with resources eclipse/maven enviornment. – MuayThai Oct 22 '15 at 12:44

1 Answers1

0

I think you have remaining below maven tag in dependency.

please add this:

<type>jar</type>

Check this link for more.

Community
  • 1
  • 1
pRaNaY
  • 24,642
  • 24
  • 96
  • 146