将Github项目包含到Android Studio 2项目中,无需jar或依赖项 [英] Include Github Project into Android Studio 2 project without jar or dependency
问题描述
我发现这个sdk: is24-restapi-java
我想将其导入到我的android studio项目中以备后用。
但我找不到包含它的方法。
我通过github项目进行了一些搜索,找不到一个简单的jar或依赖项,可以将其包含到我的项目中,并且所有的进度都会生成jar或某些内容失败。
任何人都可以给我一个指导或其他东西来将这个sdk包含到我的项目中,或者我使用了错误的方法吗?
在模块名称中添加以下行代替projectName在依赖块中: 在此Android Studio开始说gradle文件自上次项目同步后发生了变化之后,请按立即同步链接开始同步。 / p>
compile project(':projectName')
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屋!