如何在android studio中设置移动点步进器

如何在android studio中设置移动点步进器

问题描述:

我是android新手。我正在尝试实现具有4个点的移动网点步进器。 我从I added dependency in my android studio 2.3.2下载了代码。
但它显示错误,同时建立gradle这个enter image description here如何在android studio中设置移动点步进器

+0

安置自己的build.gradle –

+0

没有看到你的'build.gradle'我假设你错过了'行家{URL “https://jitpack.io”}'库。否则当前版本是'1.2.2',所以也许试试这个。 – damian

我建议你:steppers

然后创建一个空的布局,如:

<?xml version="1.0" encoding="utf-8"?> 
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/stepperLayout" 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    app:ms_stepperType="dots" 
    app:ms_stepperFeedbackType="tabs|content|disabled_bottom_navigation" /> 

与你的活动布局最后补充包括:

<include layout="@layout/stepper_layout"/> 

以下是您的应用模块的build.gradle应该是什么样子。像评论中提到的@damian一样,你可能会缺少Maven存储库块。

apply plugin: 'com.android.application' 



repositories { 
    maven { url "https://jitpack.io" } 
} 


android { 
... 
} 

dependencies { 
    .... 
    compile 'com.github.fcannizzaro:material-stepper:1.0.2' 
}