方法一: 在项目的build.gradle中添加: 1 2 3 4 5 6 allprojects { repositories { ... maven { url "https://jitpack.io" } } } 在模型(app)的build.gradle中添加: 1 2 3 dependencies { compile 'com.github.JakeWharton:ViewPagerIndicator:2.4.1' } 添加之后,