2014-11-08 62 views
0

我一直在嘗試了幾次,嘗試了不同的庫(認爲問題在於存在)和每一次得到渲染問題模塊項目作爲Android Studio中庫對描繪問題

Rendering problem

當我嘗試指示列表視圖現在是一個LoadMoreListView,如庫的this guide時,會發生此問題。

佈局/ fragment_main.xml文件

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:paddingLeft="@dimen/activity_horizontal_margin" 
android:paddingRight="@dimen/activity_horizontal_margin" 
android:paddingTop="@dimen/activity_vertical_margin" 
android:paddingBottom="@dimen/activity_vertical_margin" 
tools:context=".MainActivity$PlaceholderFragment"> 

<TextView 
    android:id="@+id/section_label" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" /> 

<com.costum.android.widget.LoadMoreListView 
    android:id="@+id/android:list" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" /> 
</RelativeLayout> 

我已經嘗試了不同的指南(thisthisthis)和每一次我得到這些呈現問題。


我怎麼導入:

所以我把圖書館變成應用程序/庫/ '庫位置'

enter image description here

Settings.gradle文件:

include ':app' 
include ':app:libraries:pulltorefresh-and-loadmore' 

應用程序/的build.gradle文件添加依賴性:

dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
compile 'com.android.support:appcompat-v7:19.+' 
compile project('libraries:pulltorefresh-and-loadmore') 
} 

該項目於github如果需要的話..

我在做什麼錯?提前致謝。

回答

0

當您構建項目時,您應該會收到編譯錯誤。您在compile project聲明中指定的路徑必須與您的settings.gradle文件中的路徑相同。更改此:

compile project('libraries:pulltorefresh-and-loadmore') 

這樣:

compile project('app:libraries:pulltorefresh-and-loadmore') 
+0

EHM ..但我有確切的是,在'settings.gradle'。 – AnZyuZya 2014-11-08 16:03:04

相關問題