AndroidStudio 3.0升級之compile、implementation簡要說明

來源:互聯網
上載者:User

標籤:shu   依賴關係   number   div   ids   分享   compile   2.0      

1.現象
androidStudio 升級至3.0後 之前引用庫所使用的complie預設變成implementation如以下:    3.0之前    compile ‘io.reactivex.rxjava2:rxandroid:2.0.1‘    compile ‘io.reactivex.rxjava2:rxjava:2.1.3‘    3.0之後    implementation ‘io.reactivex.rxjava2:rxandroid:2.0.1‘    implementation ‘io.reactivex.rxjava2:rxjava:2.1.3‘除以上之外,還有以下: androidTestCompile(前)   androidTestImplementation(後)   testCompile(前) testImplementation (後)

所示:

以上兩指令說明
compile: 如有模組之間存在依賴的話,引用是正常的。implementation: 引用的庫只能在當前模組中使用,即便模組之間存在依賴關係的話,也不可以引用。說到以上,舉一個不是很恰當的例子,有點像:Java中 public 與 private
 

AndroidStudio 3.0升級之compile、implementation簡要說明

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.