android studio學習---Android studio 匯入github工程

來源:互聯網
上載者:User

標籤:

 無論是那種方式,都最好是先把github上的工程項目下載到本地,然後修改檔案再import

首先要知道  自己的build.gradle,在project下面的版本號碼是多少,比如我的:

    dependencies {        classpath ‘com.android.tools.build:gradle:1.2.3‘        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }

 

第二個地方就是你的 gradle-wrapper.properties   下面是我的值:

 

 

方法一:直接匯入project

 

 

 

方法二:匯入需要的module(庫項目)

           這個我覺得只有兩步即可,

           1.需要把module下面的build.gradle    

               apply from: ‘../gradle/maven_push.gradle‘
給注釋掉
//apply from: ‘../gradle/maven_push.gradle‘

2.步驟2,File->New->import module ->填寫一個路徑->OK之後,記得更改 android{}裡面的屬性值,主要是SDK版本,然後重新編譯,

就這樣簡單,肯定可以的

 

android studio學習---Android studio 匯入github工程

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.