将Github项目包含到Android Studio 2项目中,无需jar或依赖项 [英] Include Github Project into Android Studio 2 project without jar or dependency

查看:206
本文介绍了将Github项目包含到Android Studio 2项目中,无需jar或依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现这个sdk: is24-restapi-java
我想将其导入到我的android studio项目中以备后用。
但我找不到包含它的方法。

我通过github项目进行了一些搜索,找不到一个简单的jar或依赖项,可以将其包含到我的项目中,并且所有的进度都会生成jar或某些内容失败。

任何人都可以给我一个指导或其他东西来将这个sdk包含到我的项目中,或者我使用了错误的方法吗?

解决方案


  • 转至文件 - >新建 - >导入模块。
  • 源目录 - >浏览项目路径

  • 指定模块名称 - 它用于内部项目引用。
  • 打开build.gradle(Module:app)文件。

  • 在模块名称中添加以下行代替projectName在依赖块中:

      compile project(':projectName')

    在此Android Studio开始说gradle文件自上次项目同步后发生了变化之后,请按立即同步链接开始同步。 / p>



  • 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?

    解决方案

    • 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.

    这篇关于将Github项目包含到Android Studio 2项目中,无需jar或依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆