The problem is these 6 lines in layout XML. If I remove these 6 lines, Eclipse compiles but runs with com.viewpagerindicator.TitlePageIndicator inflation error. In the project property android library reference section, there is red-cross in front of referenced viewpagerindicator library project and there is '?' for project name. Is this the cause? How to turn red-cross into green-checker?
app:footerColor="#FFAA2222"
app:footerLineHeight="4dp"
app:footerIndicatorHeight="22dp"
app:footerIndicatorStyle="underline"
app:selectedColor="#FF000000"
app:selectedBold="true"
Here is the error message in Eclipse XML editor:
Multiple annotations found at this line: - error: No resource identifier found for attribute 'footerIndicatorStyle' in package 'com.example.testtab' - error: No resource identifier found for attribute 'footerColor' in package 'com.example.testtab' - error: No resource identifier found for attribute 'selectedBold' in package 'com.example.testtab' - error: No resource identifier found for attribute 'selectedColor' in package 'com.example.testtab' - error: No resource identifier found for attribute 'footerIndicatorHeight' in package 'com.example.testtab' - error: No resource identifier found for attribute 'footerLineHeight' in package 'com.example.testtab'
Here is the XML Layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@+id/lay1"
android:orientation="vertical"
android:layout_width="400dp"
android:layout_height="fill_parent"
>
<com.viewpagerindicator.TitlePageIndicator
android:id="@+id/indicator"
android:padding="15dip"
android:layout_height="wrap_content"
android:layout_width="400dp"
android:background="#18FF0000"
android:textColor="#AA000000"
app:footerColor="#FFAA2222"
app:footerLineHeight="4dp"
app:footerIndicatorHeight="22dp"
app:footerIndicatorStyle="underline"
app:selectedColor="#FF000000"
app:selectedBold="true"/>
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="400dp"
android:layout_height="0dp"
android:layout_weight="1"
/>
</LinearLayout>
It turns out that the project and the library project reside in different drive(C: and D: respectively) on Windows 7. The problem solved by moving them into the same drive. This is a bug. ADT version 22.05, Eclipse version Juno Release 2. Target API 18.