Best way to incorporate Volley (or other library) into Android Studio project

前端 未结 8 821
被撕碎了的回忆
被撕碎了的回忆 2020-11-30 17:55

I\'ve seen different advice on the best way to do this This question covers creating a jar. Elsewhere, I\'ve seen advice to simply copy the volley source into your own proje

8条回答
  •  情话喂你
    2020-11-30 18:34

    For incorporate volley in android studio,

    1. paste the following command in terminal (
      git clone https://android.googlesource.com/platform/frameworks/volley ) and run it.

      Refer android developer tutorial for this.

      It will create a folder name volley in the src directory.
    2. Then go to android studio and right click on the project.
    3. choose New -> Module from the list.
    4. Then click on import existing Project from the below list.
    5. you will see a text input area namely source directory, browse the folder you downloaded (volley) and then click on finish.
    6. you will see a folder volley in your project view.
    7. the switch to android view and open the build:gradle(Module:app) file and append the following line in the dependency area:

      compile 'com.mcxiaoke.volley:library-aar:1.0.0'

    8. Now synchronise your project and also build your project.

提交回复
热议问题