[英]Build errors while using Android library project
我正在尝试在github上使用此库项目:
https://github.com/pakerfeldt/android-viewflow
此Android库项目可进行水平滑动。
我将解释我如何使用此库的动作:
<?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/com.example.test" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <LinearLayout android:id="@+id/header_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:orientation="vertical" > <org.taptwo.android.widget.TitleFlowIndicator android:id="@+id/viewflowindic" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dip" app:clipPadding="5dp" app:footerColor="#FFFFC445" app:footerLineHeight="2dp" app:footerTriangleHeight="10dp" app:selectedColor="#FFFFC445" app:selectedSize="12dp" app:textColor="#FFFFFFFF" app:textSize="11dp" app:titlePadding="10dp" > </org.taptwo.android.widget.TitleFlowIndicator> </LinearLayout> <org.taptwo.android.widget.ViewFlow android:id="@+id/viewflow" android:layout_width="fill_parent" android:layout_height="fill_parent" android:duplicateParentState="true" > </org.taptwo.android.widget.ViewFlow> </LinearLayout>
但是Eclipse给出了以下错误:
Description Resource Path Location Type
R cannot be resolved to a variable Main.java /test/src/com/example/test line 14 Java Problem
R cannot be resolved to a variable Main.java /test/src/com/example/test line 19 Java Problem
error: No resource identifier found for attribute 'titlePadding' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
error: No resource identifier found for attribute 'textSize' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
error: No resource identifier found for attribute 'textColor' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
error: No resource identifier found for attribute 'selectedSize' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
error: No resource identifier found for attribute 'selectedColor' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
error: No resource identifier found for attribute 'clipPadding' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
error: No resource identifier found for attribute 'footerColor' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
error: No resource identifier found for attribute 'footerLineHeight' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
error: No resource identifier found for attribute 'footerTriangleHeight' in package 'com.example.test' main.xml /test/res/layout line 15 Android AAPT Problem
我导入了其示例项目( https://github.com/pakerfeldt/android-viewflow/tree/master/viewflow-example ),它运行良好!
问题可能与名称空间有关,但我无法解决。
app:selectedSize =“ 12dp”删除此行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.