How to import Patio Library in my Project

Issue

I found this library in android-arsenal that would fit perfect in my project.

https://android-arsenal.com/details/1/1076

https://github.com/asantibanez/Patio

I tried to import like this:

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

dependencies {
    compile 'com.github.asantibanez:Patio:d11e20326e'
}

But I got a error like this

Error:A problem occurred configuring project ':app'.
> Artifact 'Patio.jar (com.github.asantibanez:Patio:d11e20326e)' not found.
  Searched in the following locations:
      https://jitpack.io/com/github/asantibanez/Patio/d11e20326e/Patio-d11e20326e.jar

Another thing that I tried was to import by downloading the project zip, and importing it to my project by: File > Import Module. ( Patio-Master folder )

But I got a Gradle error.

Error:(16, 0) Gradle DSL method not found: 'runProguard()'
Possible causes:<ul><li>The project 'dealerbook' may be using a version of Gradle that does not contain the method.
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>

Is there a better/right way to import it to my project?

Solution

  1. Download Patio project.
  2. Unzip
  3. Import module
  4. Select folder Patio-master/Patio
  5. Finish
  6. Edit build.gradle file (Patio one, not your project one)
  7. Change the follow line to the same as your project build.gradle file
compileSdkVersion 21
buildToolsVersion "21.1.2"
  1. Comment the follow line in Patio gradle file
applicationId "com.andressantibanez.android.patio"
  1. Go to File > Project Structure > Dependences
  2. Click on the (left|plus|add) button on the left bottom
  3. Select module dependence
  4. Find Patio in it.
  5. Now you’r done to use Patio

Answered By – wviana

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published