• 在android studio中导入github下载的工程


    1、从Github中下载工程压缩包,并将其解压到本地


    2、修改文件

    假设,解压后的文件目录如下:

    (1)修改配置文件  xxuild.gradle

    1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
    2. buildscript {
    3.    repositories {
    4.        jcenter()
    5.    }
    6.    dependencies {
    7.        classpath 'com.android.tools.build:gradle:1.3.0'
    8.        // NOTE: Do not place your application dependencies here; they belong
    9.        // in the individual module build.gradle files
    10.    }
    11. }
    12. allprojects {
    13.    repositories {
    14.        jcenter()
    15.    }
    16. }

    (2)修改gradle版本  xxgradlewrappergradle-wrapper.properties

    1. distributionUrl=https://services.gradle.org/distributions/gradle-2.4-all.zip

    (3)修改gradle.properties  xxgradle.properties(如果项目有并且需要的话)

    1. ANDROID_BUILD_TARGET_SDK_VERSION=23  
    2. ANDROID_BUILD_TOOLS_VERSION=23  
    3. ANDROID_BUILD_SDK_VERSION=23

    (4)修改Applicationbuild.gradle   libraryuild.gradle   xxlibraryuild.gradle(如果项目有并且需要的话)

    i、注释掉这句代码://apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle' (如果项目有并且需要的话)

    ii、

    1.    compileSdkVersion 23
    2.    buildToolsVersion "23.0.1"
    3.    defaultConfig {
    4.        minSdkVersion 21
    5.        targetSdkVersion 23
    6.    }
    7.    compileOptions {
    8.        sourceCompatibility JavaVersion.VERSION_1_7
    9.        targetCompatibility JavaVersion.VERSION_1_7
    10.    }

    3、打开Android Studio,导入修改后的工程



    4、如果导入后没有报错,则说明运行OK


    可能需要改动的文件:






  • 相关阅读:
    如何利用WGET覆写已存在的档案
    linux 脚本返回值
    ubuntu的配置网络
    非交互模式修改Ubuntu密码的命令
    [zz]python多进程编程
    [zz]linux修改密码出现Authentication token manipulation error的解决办法
    [zz]4.1.5 进程的处理器亲和性和vCPU的绑定
    vcpu
    非交互式调用交互式程序
    HDOJ_ACM_饭卡
  • 原文地址:https://www.cnblogs.com/Amandaliu/p/5098301.html
Copyright © 2020-2023  润新知