将PullToRefresh集成到Android项目中
我正在使用Android Studio 0.4.2,我想将该功能集成到我的项目中。 但无论我做什么,我都不会跑。。。应用程序停止或编译器停止 下面是一些projext文件: 格雷德尔先生将PullToRefresh集成到Android项目中,android,gradle,android-studio,pull-to-refresh,Android,Gradle,Android Studio,Pull To Refresh,我正在使用Android Studio 0.4.2,我想将该功能集成到我的项目中。 但无论我做什么,我都不会跑。。。应用程序停止或编译器停止 下面是一些projext文件: 格雷德尔先生 apply plugin: 'android' android { compileSdkVersion 19 buildToolsVersion "19.0.1" defaultConfig { minSdkVersion 7 targetSdkVer
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile 'com.github.chrisbanes.actionbarpulltorefresh:library:+'
compile 'com.android.support:appcompat-v7:+'
}
activity\u time\u table.xml(它是主活动)
嗯。因此,当我将项目与gradl同步时,它会加载并检查所有依赖项,而不会出现任何错误或其他任何情况。
但是,当我尝试导入actionbarpulltorefresh
所需的类时,它找不到它们,或者建议只导入uk.co.senab.actionbarpulltorefresh.library
,这没有帮助
你能告诉我我做错了什么吗?可能是重复的井谢谢。。。至少它导入了丢失的库..您有正确的依赖项,并且
<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"
tools:context=".TimeTable" >
<!-- We need to wrap the WEbview to enable Pull to refresh -->
<uk.co.senab.actionbarpulltorefresh.library.PullToRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ptr_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:id="@+id/webViewTimeTable"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" />
</uk.co.senab.actionbarpulltorefresh.library.PullToRefreshLayout>
</RelativeLayout>