在 Android Studio 和 Gradle 中使用 ViewPagerIndicator 库 [英] Using ViewPagerIndicator library with Android Studio and Gradle

查看:29
本文介绍了在 Android Studio 和 Gradle 中使用 ViewPagerIndicator 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Jake Wharton 的 ViewPagerIndicator 库,但我无法在我的 Gradle 项目中使用它安卓工作室.

I'm trying to use Jake Wharton's ViewPagerIndicator library, but I'm unable to get it working with my Gradle project in Android Studio.

我将其添加为依赖项,如下所示:

I add it as a dependency like so:

    dependencies {
       // ... other ommitted
       compile 'com.viewpagerindicator:library:2.4.1'
       compile 'com.android.support:support-v4:19.0.1'
       compile 'com.nineoldandroids:library:2.4.0'
       // ...
    }

但该项目似乎无法识别库中的任何组件.我想知道是否存在不同 support-v4 版本的依赖问题或 Nineoldandroids 中的某些东西...?

but the project doesn't seem to recognize any components in the library. I'm wondering if there's a dependency issue with different support-v4 versions or something in nineoldandroids...?

推荐答案

我刚刚在 maven central 中推送了一个版本,所以你只需要添加那个依赖项:

I just pushed a version inside maven central so you only need to add that dependency :

compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'

并像这样声明 maven central :

And declare maven central like this :

repositories {
    mavenCentral()
}

希望能帮到你...

这篇关于在 Android Studio 和 Gradle 中使用 ViewPagerIndicator 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆