How to implement fixed version of library to my Android studio project?

You have several options:

  1. Wait for/Ask the owner to release a new version and use it.

  2. Fork the project and release one version of your own.

  3. Download the library and import it in your project as a dependency.

I'll explain here the third option:

  • Go to https://github.com/heinrichreimer/material-intro.
  • Click the Code button and Download ZIP.
  • Open the ZIP file and open the material-intro-master folder.
  • Rename the library folder to material-intro-library.
  • Open your project in Android Studio.
  • Go to File > New > Import module... and select the material-intro-library folder.
  • Finally, open your build.gradle file and replace implementation 'com.heinrichreimersoftware:material-intro:2.0.0' with implementation project(path: ':material-intro-library')

You can clone material-intro library to your pc. Place the material-intro/lib folder to your project root directory path.

add include ':library' to your setings.gradl

add implementation project(':library') to your app-level build.gradle


You could use JitPack.io which acts as a repository for libraries just like maven and also to compile any Android or Java library using Gradle on GitHub at the required commit (found in the the pull request) and use the compiled library in your project in two steps. No need for waiting, cloning, importing or even compiling on your local PC, all done and covered by JitPack.io. Here are the the steps (retrieved from website):

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.heinrichreimer:material-intro:b35d1c9d65'
}