Import Android volley to Android Studio

前端 未结 17 2157
孤街浪徒
孤街浪徒 2020-12-07 11:33

I wanna use the google\'s volley library

I am using Android Studio and I know how to add .jar libraries.

But I could not create a .jar library with the voll

相关标签:
17条回答
  • 2020-12-07 12:13

    After putting compile 'com.android.volley:volley:1.0.0' into your build.gradle (Module) file under dependencies, it will not work immediately, you will have to restart Android Studio first!

    0 讨论(0)
  • 2020-12-07 12:16

    Add this in your "build.gradle" of you app.

    implementation 'com.android.volley:volley:1.1.1'

    0 讨论(0)
  • 2020-12-07 12:19

    Volley is now officially available on JCenter:

    Add this line to your gradle dependencies for your Android project's app module:

    implementation 'com.android.volley:volley:1.1.1'

    0 讨论(0)
  • 2020-12-07 12:20

    Way too complicated guys. Just include it in your gradle dependencies:

    dependencies {
        ...
        compile 'com.mcxiaoke.volley:library:1.0.17'
    }
    
    0 讨论(0)
  • 2020-12-07 12:21

    In the "build.gradle" for your app, (the app, not the project), add this:

    dependencies {
        ...
        implementation 'com.android.volley:volley:1.1.0'
    }
    
    0 讨论(0)
  • 2020-12-07 12:21

    Or you can simply do

    ant jar
    

    in your cloned volley git project. You should now see volley.jar in the volley projects bin folder. Copy this to you Android Studio's app\libs folder. Then add following under dependencies section of Module level build.gradle file -

    compile files('libs/volley.jar')
    

    And you should be good import and use the library classes in your project,

    0 讨论(0)
提交回复
热议问题