Import Android volley to Android Studio

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

    To add volley as submodule and getting regular updates from the GIT repo the following steps can be followed. Main advantage is, Volley can be customised and source code could be pull from GIT repo whenever update is required.

    It is also helping for debugging purpose.

    Follow the below steps :

    Step I :

    Add volley as submodule in Android application project GIT Repo. git submodule add -b master https://android.googlesource.com/platform/frameworks/volley Libraries/Volley

    Step II :

    In settings.gradle, add the following to add volley as a studio project module. include ':Volley' project(':Volley').projectDir=new File('../Libraries/Volley')

    Step III :

    In app/build.gradle, add following line to compile Volley compile project(':Volley')

    That would be all! Volley has been successfully added in the project.

    Every time you want to get the latest code from Google official Volley's repo, just run the below command

    git submodule foreach git pull
    

    For more detailed information : https://gitsubmoduleasandroidtudiomodule.blogspot.in/

    GIT Repo sample code : https://github.com/arpitratan/AndroidGitSubmoduleAsModule

提交回复
热议问题