zoukankan      html  css  js  c++  java
  • 在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


    可能需要改动的文件:






  • 相关阅读:
    结语
    Print all nodes at distance k from a given node
    Construct a tree from Inorder and Level order traversals
    Transform a BST to greater sum tree
    Minimum no. of iterations to pass information to all nodes in the tree
    Print a Binary Tree in Vertical Order
    Rearrange a string so that all same characters become d distance away
    Suffix array
    cocos2d-x 3.2 椭圆运动
    cocos2d-x 3.2 DrawNode 绘图API
  • 原文地址:https://www.cnblogs.com/Amandaliu/p/5098301.html
Copyright © 2011-2022 走看看