Question

I have a project. I have it running on one machine using Eclipse. I then uploaded it to Github and cloned it on another machine.

I can't get it working on the second machine.

The R-file won't compile.

The XML says

<style name="CustomTabPageIndicator" parent="Widget.TabPageIndicator">
    <item name="android:background">@drawable/custom_tab_indicator</item>
</style>

and

<item name="vpiTabPageIndicatorStyle">@style/CustomTabPageIndicator</item>
<item name="vpiTabTextStyle">@style/CustomTabPageIndicator.Text</item>

VPI has a vpi_styles.xml which goes

<resources>
  ...
  <style name="Widget.TabPageIndicator" parent="Widget">
    <item name="android:gravity">center_horizontal</item>
    <item name="android:background">@drawable/vpi__tab_indicator</item>
    <item name="android:paddingLeft">22dip</item>
    <item name="android:paddingRight">22dip</item>
    <item name="android:paddingTop">12dp</item>
    <item name="android:paddingBottom">12dp</item>
  </style>
....
</resources>

I've got three projects, my own, plus com_viewpagerindicator and svg-android.

The build path of my own project has the other two as "Projects", and also ticked in "Order and Export".

What is the trick to have my XML find the style from VPI?

Was it helpful?

Solution

Make sure you set the project dependencies in two places.

  1. Right-click on the project.
  2. Click Java Build Path in the list
  3. Click Library
  4. Add the library ViewPagerIndicator
  5. Click Android in the list
  6. Add the library ViewPagerIndicator
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top