Include Github Project into Android Studio 2 project without jar or dependency

故事扮演 提交于 2019-12-12 05:47:54

问题


i have found this sdk: is24-restapi-java and i want to import it into my android studio project for further use. But i can't find a way to include it.

I did some searching through the github project i cannot find a simple jar or dependency that i can include into my project and all advances to generate a jar or something failed.

Can anyone give me a guid or something to include this sdk into my project or am i using the wrong approach?


回答1:


  • Goto File -> New -> Import Module.
  • Source Directory -> Browse the project path
  • Specify the Module Name – it is used for internal project reference.
  • Let Android Studio build the project.
  • Open build.gradle (Module:app) file.
  • Add the following line with your module name in place of “projectName” in the dependencies block:

     compile project(':projectName')
    

    After this Android Studio would start saying “gradle files have changed since last project sync”, press the “sync now” link to start a sync.



来源:https://stackoverflow.com/questions/41822842/include-github-project-into-android-studio-2-project-without-jar-or-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!