I want to use android.support.v7.widget.SwitchCompat
This is more of a problem than I ever imagined. I need to know the exact steps to include v7 compatibility library in maven build.
So far I either run into class not found error on android.support.v7.widget.SwitchCompat or when I include that jar,or I get exception related to not finding R.attr at runtime when it compiles ok.
So I need to know exactly what needs to be done to compile v7 so that everything I need is in the APK.
I don't see that classes.jar inside apklib even has the R.attr etc.
Could someone just tell me exactly what I need to do include v7 compatibility in my maven build.
<dependency>
<groupId>android.support</groupId>
<artifactId>compatibility-v7</artifactId>
<version>23.0.1</version>
<type>apklib</type>
<scope>system</scope>
<systemPath>${basedir}/libs/appcompat-v7-23.0.1.jar</systemPath>
</dependency>
<dependency>
<groupId>com.android.support</groupId>
<artifactId>appcompat-v7</artifactId>
<version>23.0.1</version>
<type>jar</type>
<scope>system</scope>
<systemPath>${basedir}/libs/android-support-v7-appcompat.jar</systemPath>
</dependency>
I have seen it said before to use compile scope, but this is not available if the libs are on system. It must use system scope.
Now in the past I always use eclipse, and when something was missing at runtime it was always just a matter of 'exporting' certain jars in ide, so now with pure maven pom build, I don't know what to do. It needs to be built on server where eclipse is not part of the build process. What I am not getting is what is telling the build to include the classes like R.attr at runtime related to this UI library? I need to resources at runtime. In the past, I always just depended on eclipse exporting of jars for this and link to the library. Now it is not so clear ...
Can someone tell me how to tell maven to check my local repo for items? Right now if it does not find an item on server it ends in error even if I installed items locally in on files system \username.m2