gpt4 book ai didi

android - 模块项目作为 Android Studio 中的库导致渲染问题

转载 作者:行者123 更新时间:2023-12-03 06:19:56 25 4
gpt4 key购买 nike

我已经尝试了几次并尝试了不同的库(认为问题出在那儿),每次都得到 渲染问题 :

Rendering problem

当我尝试指示 ListView 现在是 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 )并且每次遇到这些渲染问题。

我是如何导入的:

所以我把库放到 app/libraries/'library here' 中:

enter image description here
Settings.gradle文件:
include ':app'
include ':app:libraries:pulltorefresh-and-loadmore'

并在 app/build.gradle 文件中添加了依赖项:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:19.+'
compile project('libraries:pulltorefresh-and-loadmore')
}

这个项目在 github如果需要的话..

我究竟做错了什么?提前致谢。

最佳答案

构建项目时应该会出现编译错误。您在 compile project 中指定的路径声明必须与您的 中的相同settings.gradle 文件。改变这个:

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

对此:
compile project('app:libraries:pulltorefresh-and-loadmore')

关于android - 模块项目作为 Android Studio 中的库导致渲染问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26818295/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com