How to import Maven dependency in Android Studio/IntelliJ?

后端 未结 5 417
后悔当初
后悔当初 2020-11-29 18:54

I\'ve created a new Android project using the default wizard in Android Studio. Compiled, and deployed the app to my device. All is well.

Now I want to import an ext

5条回答
  •  借酒劲吻你
    2020-11-29 19:23

    Android Studio 3

    The answers that talk about Maven Central are dated since Android Studio uses JCenter as the default repository center now. Your project's build.gradle file should have something like this:

    repositories {
        google()
        jcenter()
    }
    

    So as long as the developer has their Maven repository there (which Picasso does), then all you would have to do is add a single line to the dependencies section of your app's build.gradle file.

    dependencies {
        // ...
        implementation 'com.squareup.picasso:picasso:2.5.2'
    }
    

提交回复
热议问题