如何将github项目导入Android Studio
来源:互联网 发布:hessian矩阵 编辑:程序博客网 时间:2024/04/28 04:59
从github上下载了一个开源项目:MoneyTextView
存放地址:D:\android_new\MyProject\MoneyTextView
在导入前,要更改一些参数:
第一个文件:MoneyTextView\build.gradle
dependencies { classpath 'com.android.tools.build:gradle:0.6.+' }
0.6+,改成你的版本。如果你不知道该改成啥,最简单的方式是你新建一个project,找到这个文件看这个值是多少。
更改后:
dependencies { classpath 'com.android.tools.build:gradle:1.0.0' }
第二个文件:
D:\android_new\MyProject\MoneyTextView\gradle\wrapper\gradle-wrapper.properties
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip
gradle-1.8.all.zip,改成你的版本。如上,如果不知道你可以新建一个project,去找。
更改后:
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
第三个文件:
D:\android_new\MyProject\MoneyTextView\gradle-wrapper.properties
ANDROID_BUILD_TARGET_SDK_VERSION=19 ANDROID_BUILD_TOOLS_VERSION=19 ANDROID_BUILD_SDK_VERSION=19
对应改成你的版本
更改后:
ANDROID_BUILD_TARGET_SDK_VERSION=21 ANDROID_BUILD_TOOLS_VERSION=21.1.2 ANDROID_BUILD_SDK_VERSION=21
(如果你的项目这个文件没有上面配置,则不用管。)
第四个文件:
D:\android_new\MyProject\MoneyTextView\library\build.gradle
apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
注释掉这句代码
更改后:
//apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
(如果你的项目这个文件没有上面配置,则不用管。)
其他文件:
D:\android_new\MyProject\MoneyTextView\library\project.properties和D:\android_new\MyProject\MoneyTextView\sample\project.properties
target=android-17
指定你的sdk版本
0 0
- 如何将github项目导入Android Studio
- Android:如何将Github上的项目导入Android Studio
- android studio中如何导入github项目
- 如何将最短时间将Github上的开源项目导入到android studio中
- 如何将github的项目直接导入到Android studio中
- 如何将android studio项目导入eclipse
- 将Github下载的项目导入android studio
- Android Studio 导入github项目
- android studio导入github项目
- Android studio导入github项目
- android studio导入github项目
- Android Studio导入github项目
- Android Studio导入github项目
- android studio如何导入github中的Android项目
- Android Studio如何导入Github上的项目
- Android Studio如何导入Github上的项目
- Android-如何将android studio项目上传至github
- 如何将Android Studio项目提交(更新)到github
- The Tower of Babylon
- js使用正则表达式和prototype实现jsonp转json
- 生活中的物理、化学
- urllib2下载器网页的三种方法
- 测试开发微博第三方登录
- 如何将github项目导入Android Studio
- 使用 NuGet Package Explorer 制作 js 包
- 一个简单的I/O读写锁
- LDA︱基于LDA的Topic Model变形+一些NLP开源项目
- Android5.0+(Toolbar)
- nyoj一种排序
- iOS状态栏设置详解!
- javascript高级之操作符、作用域
- 答案1