一、从Github中下载工程压缩包,并将其解压到本地java
2、修改文件android
假设,解压后的文件目录以下:git
(1)修改配置文件 xx\build.gradlegithub
// Top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { jcenter() }}
(2)修改gradle版本 xx\gradle\wrapper\gradle-wrapper.propertiesapp
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
(3)修改gradle.properties xx\gradle.properties(若是项目有而且须要的话)gradle
ANDROID_BUILD_TARGET_SDK_VERSION=23 ANDROID_BUILD_TOOLS_VERSION=23 ANDROID_BUILD_SDK_VERSION=23
(4)修改Application\build.gradle library\build.gradle xx\library\build.gradle(若是项目有而且须要的话)ui
i、注释掉这句代码://apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle' (若是项目有而且须要的话)
spa
ii、3d
compileSdkVersion 23 buildToolsVersion "23.0.1" defaultConfig { minSdkVersion 21 targetSdkVersion 23 } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 }
三、打开Android Studio,导入修改后的工程code
四、若是导入后没有报错,则说明运行OK
可能须要改动的文件: