亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

Android Studio3.0升級(jí)后使用注意事項(xiàng)及解決方法

 更新時(shí)間:2017年12月06日 11:04:27   作者:chasten08  
這篇文章主要介紹了Android Studio3.0升級(jí)后使用注意事項(xiàng)及解決方法,需要的朋友參考下吧

Gradle plugin最高版本4.*

老的項(xiàng)目在使用新版本時(shí),可能會(huì)出現(xiàn)gradle plugin沖突的問題

Error:Failed to open zip file. Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network) Re-download dependencies and sync project (requires network)

解決方法:

去往gradle安裝目錄(File->Other Settings->Default Settings,然后可以搜索gradle,右側(cè)有Service directory path可以看到你gradle目錄),.gradle\wrapper\dists目錄下找到和項(xiàng)目的gradle-wrapper.properties里版本號(hào)一致的文件(比如gradle-3.3-all)刪除,重新編譯即可

Cannot choose between the following configurations,產(chǎn)生這個(gè)問題的原因是項(xiàng)目用引用了其他項(xiàng)目,比如compileproject(:library),

解決方法:

Android Studio3.0以后需要使用如下方式:

implementation project(path: ':library', configuration: 'default')

伴隨著 Android Gradle 插件 2.2 版本的發(fā)布,近期 android-apt 作者在官網(wǎng)發(fā)表聲明證實(shí)了后續(xù)將不會(huì)繼續(xù)維護(hù) android-apt,并推薦大家使用 Android 官方插件提供的相同能力。也就是說,大約三年前推出的 android-apt 即將告別開發(fā)者,退出歷史舞臺(tái),Android Gradle 插件提供了名為 annotationProcessor的功能來完全代替 android-apt,更換的步驟如下:

移除 Module 的 build.gradle 文件中對(duì) android-apt 的相關(guān)配置,也就是刪除類似下面的配置:     

 buildscript {
      repositories {
        jcenter()
      }
      dependencies {
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
      }
    }
    apply plugin: 'com.neenbedankt.android-apt'

將 Module 的 build.gradle 文件中使用 apt 引入的依賴修改為使用 annotationProcessor 進(jìn)行引入,修改前配置如下:

    dependencies {
     compile 'com.google.dagger:dagger:2.0'
     apt 'com.google.dagger:dagger-compiler:2.0'
    }

修改后配置如下: 

   dependencies {
      compile 'com.google.dagger:dagger:2.0'
      annotationProcessor 'com.google.dagger:dagger-compiler:2.0'
    }

總結(jié)

以上所述是小編給大家介紹的Android Studio3.0升級(jí)后使用注意事項(xiàng),希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

  • 手機(jī)/移動(dòng)前端開發(fā)需要注意的20個(gè)要點(diǎn)

    手機(jī)/移動(dòng)前端開發(fā)需要注意的20個(gè)要點(diǎn)

    本文主要介紹了手機(jī)/移動(dòng)前端開發(fā)需要注意的20個(gè)要點(diǎn),具有很好的參考價(jià)值。下面跟著小編一起來看下吧
    2017-03-03
  • Android 阿里云OSS文件上傳的實(shí)現(xiàn)示例

    Android 阿里云OSS文件上傳的實(shí)現(xiàn)示例

    這篇文章主要介紹了Android 阿里云OSS文件上傳的實(shí)現(xiàn)示例,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2020-08-08
  • Android自定義半圓形圓盤滾動(dòng)選擇器

    Android自定義半圓形圓盤滾動(dòng)選擇器

    這篇文章主要為大家詳細(xì)介紹了Android自定義半圓形圓盤滾動(dòng)選擇器 ,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2018-07-07
  • 最新評(píng)論