2012-07-09 6 views
1

J'essaie d'utiliser ce projet de bibliothèque sur github:Construire des erreurs lors de l'utilisation projet de bibliothèque Android

https://github.com/pakerfeldt/android-viewflow

Ce projet de bibliothèque Android fournit horizonally glisser le doigt.

Je vais vous expliquer mes mouvements que je suis en train d'utiliser cette bibliothèque:

  1. J'ai téléchargé ce projet de projet github et importé « viewflow » avec « Projets existants dans l'espace de travail ». (Eclipse donne quelques erreurs mais je les ai corrigées Ce n'est pas le problème.)
  2. J'ai créé un nouveau projet Android dont le nom est "test".
  3. J'ai ajouté le projet de flux d'affichage au chemin de construction de mon projet de test. (Utilisation de Java Créer Path-> Projets-> Ajouter)
  4. Voici mon main.xml:
<?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> 

Mais Eclipse donne ces erreurs:

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 

J'ai importé son exemple de projet (https://github.com/pakerfeldt/android-viewflow/tree/master/viewflow-example), ça marche bien!

Le problème peut concerner les espaces de noms mais je n'ai pas pu résoudre ce problème.

+0

R ne peut pas être résolu à une variable => essayer propre et construire la première – Klaasvaak

+0

projet propre de la bibliothèque, puis retirez le projet de bibliothèque ajouté à votre projet dans le chemin de la construction, maintenant ajoutez à nouveau le projet de bibliothèque à votre projet et vérifiez. –

+0

J'ai essayé, mais ça ne marche pas. Si je supprime complètement org.taptwo.android.widget.TitleFlowIndicator, il n'y a pas de problème. Je suppose qu'il y a un problème avec xmlns: ligne d'application. – voiceofthesoul

Répondre

1

app: selectedSize = « 12dp » supprimer cette ligne

Questions connexes