Import Android volley to Android Studio

前端 未结 17 2155
孤街浪徒
孤街浪徒 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:22

    Updating Warpzit's answer for Android Studio 1.3.2 (differences in bold)
    (update: appears to be the same for Android 2.0)

    1. First get latest volley with git.
    2. In your current project (android studio) click [file] --> [New]--> [New Module].
    3. Now select [Import Gradle Project], Click Next
    4. Now select the directory where you downloaded Volley to.
    5. Now Android studio might guide you to do the rest but continue guide to verify that everything works correct
    6. Open settings.gradle (find in root) and add (or verify this is included):

      include ':app', ':volley'

    7. Now go to your build.gradle in your project and add the dependency:

      compile project(":volley")

提交回复
热议问题