x的最低实验条件
AndroIDStudio 3.2.0+
gradle:gradle-4.6以上
本次实验条件:
AndroIDStudio 3.3 (AS3.3强制要求最低gradle版本为gradle-4.10-all)
gradle:gradle-4.10-all
如果要在新项目中使用AndroIDX,则需要将compile SDK设置为AndroID 9.0(API级别28)或更高版本,并在gradle.properties
文件中设置以下两个AndroID Gradle插件标志。
androID.useandroidX
:设置true
为时,AndroID插件使用相应的AndroIDX库而不是支持库。如果未指定,则默认情况下为false
标志 。androID.enableJetifIEr
:设置true
为时,AndroID插件会自动迁移现有的第三方库,通过重写其二进制文件来使用AndroIDX。如果未指定,则默认情况下为false
标志。AndroIDX概述
AndroIDX是AndroID团队用于在Jetpack中开发,测试,打包,发布和发布库的开源项目 。
AndroIDX是对原始AndroID 支持库的重大改进 。与支持库一样,AndroIDX与AndroID *** 作系统分开提供,并提供跨AndroID版本的向后兼容性。AndroIDX通过提供功能奇偶校验和新库完全取代了支持库。此外,AndroIDX还包括以下功能:
androIDx
中。支持库包已映射到相应的androIDx.*
包中。有关所有旧类和构建工件的完整映射到新构件,请参阅“ 包重构”页面。与支持库不同,AndroIDX软件包是单独维护和更新的。这些androIDx
包使用严格的语义版本控制, 从版本1.0.0开始。您可以单独更新项目中的AndroIDX库。所有新的支持库开发都将在AndroIDX库中进行。这包括维护原始支持库工件和引入新的Jetpack组件。其实就是对安卓过往v7,v4,design等系列包的一个整合,不用我们多次添加与核对版本号,大大方便了我们的开发,真的是早就该这样做了。
开始体验x
新建工程有个勾,勾上
创建完成后就会发现gradle.propertIEs多了两行
这两行的作用主要是自动迁移任何尚未迁移到AndroIDX命名空间的Maven依赖项目至AndroIDX命名空间,如果是老项目现在想把整个工程其它包替换为androIDx包,在手动添加上面这两行后直接使用AS Refactor->Migrate to AndroIDX即可。
这个时候由于我本地还没有androix这个库,新建工程时的这两个在线引用implementation 'androIDx.appcompat:appcompat:1.0.0-beta01'
implementation 'androIDx.constraintlayout:constraintlayout:1.1.2'
也没有引起AS给我自动下载下来androIDx整个包,感觉很奇怪,就去官网随便找了一个对应的一个依赖,在线一填,导致它x包所有东西都下载下来了,一切回归正常,在xml和java文件写了好几个以前分布在不同的包的类,没发现什么问题,至此体验结束。
功臣包名:implementation 'com.Google.androID.material:material:1.0.0-rc01'
旧版本包与AndroIDX对照表
旧包 | AndroIDX |
---|---|
androID.arch.core:common | androIDx.arch.core:core-common:2.0.0-rc01 |
androID.arch.core:core | androIDx.arch.core:core:2.0.0-rc01 |
androID.arch.core:core-testing | androIDx.arch.core:core-testing:2.0.0-rc01 |
androID.arch.core:runtime | androIDx.arch.core:core-runtime:2.0.0-rc01 |
androID.arch.lifecycle:common | androIDx.lifecycle:lifecycle-common:2.0.0-rc01 |
androID.arch.lifecycle:common-java8 | androIDx.lifecycle:lifecycle-common-java8:2.0.0-rc01 |
androID.arch.lifecycle:compiler | androIDx.lifecycle:lifecycle-compiler:2.0.0-rc01 |
androID.arch.lifecycle:extensions | androIDx.lifecycle:lifecycle-extensions:2.0.0-rc01 |
androID.arch.lifecycle:livedata | androIDx.lifecycle:lifecycle-livedata:2.0.0-rc01 |
androID.arch.lifecycle:livedata-core | androIDx.lifecycle:lifecycle-livedata-core:2.0.0-rc01 |
androID.arch.lifecycle:reactivestreams | androIDx.lifecycle:lifecycle-reactivestreams:2.0.0-rc01 |
androID.arch.lifecycle:runtime | androIDx.lifecycle:lifecycle-runtime:2.0.0-rc01 |
androID.arch.lifecycle:viewmodel | androIDx.lifecycle:lifecycle-viewmodel:2.0.0-rc01 |
androID.arch.paging:common | androIDx.paging:paging-common:2.0.0-rc01 |
androID.arch.paging:runtime | androIDx.paging:paging-runtime:2.0.0-rc01 |
androID.arch.paging:rxjava2 | androIDx.paging:paging-rxjava2:2.0.0-rc01 |
androID.arch.persistence.room:common | androIDx.room:room-common:2.0.0-rc01 |
androID.arch.persistence.room:compiler | androIDx.room:room-compiler:2.0.0-rc01 |
androID.arch.persistence.room:guava | androIDx.room:room-guava:2.0.0-rc01 |
androID.arch.persistence.room:migration | androIDx.room:room-migration:2.0.0-rc01 |
androID.arch.persistence.room:runtime | androIDx.room:room-runtime:2.0.0-rc01 |
androID.arch.persistence.room:rxjava2 | androIDx.room:room-rxjava2:2.0.0-rc01 |
androID.arch.persistence.room:testing | androIDx.room:room-testing:2.0.0-rc01 |
androID.arch.persistence:db | androIDx.sqlite:sqlite:2.0.0-rc01 |
androID.arch.persistence:db-framework | androIDx.sqlite:sqlite-framework:2.0.0-rc01 |
com.androID.support.constraint:constraint-layout | androIDx.constraintlayout:constraintlayout:1.1.2 |
com.androID.support.constraint:constraint-layout-solver | androIDx.constraintlayout:constraintlayout-solver:1.1.2 |
com.androID.support.test.espresso.IDling:IDling-concurrent | androIDx.test.espresso.IDling:IDling-concurrent:3.1.0 |
com.androID.support.test.espresso.IDling:IDling-net | androIDx.test.espresso.IDling:IDling-net:3.1.0 |
com.androID.support.test.espresso:espresso-accessibility | androIDx.test.espresso:espresso-accessibility:3.1.0 |
com.androID.support.test.espresso:espresso-contrib | androIDx.test.espresso:espresso-contrib:3.1.0 |
com.androID.support.test.espresso:espresso-core | androIDx.test.espresso:espresso-core:3.1.0 |
com.androID.support.test.espresso:espresso-IDling-resource | androIDx.test.espresso:espresso-IDling-resource:3.1.0 |
com.androID.support.test.espresso:espresso-intents | androIDx.test.espresso:espresso-intents:3.1.0 |
com.androID.support.test.espresso:espresso-remote | androIDx.test.espresso:espresso-remote:3.1.0 |
com.androID.support.test.espresso:espresso-web | androIDx.test.espresso:espresso-web:3.1.0 |
com.androID.support.test.janktesthelper:janktesthelper | androIDx.test.jank:janktesthelper:1.0.1 |
com.androID.support.test.services:test-services | androIDx.test:test-services:1.1.0 |
com.androID.support.test.uiautomator:uiautomator | androIDx.test.uiautomator:uiautomator:2.2.0 |
com.androID.support.test:monitor | androIDx.test:monitor:1.1.0 |
com.androID.support.test:orchestrator | androIDx.test:orchestrator:1.1.0 |
com.androID.support.test:rules | androIDx.test:rules:1.1.0 |
com.androID.support.test:runner | androIDx.test:runner:1.1.0 |
com.androID.support:animated-vector-drawable | androIDx.vectordrawable:vectordrawable-animated:1.0.0 |
com.androID.support:appcompat-v7 | androIDx.appcompat:appcompat:1.2.0 |
com.androID.support:asynclayoutinflater | androIDx.asynclayoutinflater:asynclayoutinflater:1.0.0 |
com.androID.support:car | androIDx.car:car:1.0.0-Alpha5 |
com.androID.support:cardvIEw-v7 | androIDx.cardvIEw:cardvIEw:1.0.0 |
com.androID.support:collections | androIDx.collection:collection:1.0.0 |
com.androID.support:coordinatorlayout | androIDx.coordinatorlayout:coordinatorlayout:1.0.0 |
com.androID.support:cursoradapter | androIDx.cursoradapter:cursoradapter:1.0.0 |
com.androID.support:customtabs | androIDx.browser:browser:1.0.0 |
com.androID.support:customvIEw | androIDx.customvIEw:customvIEw:1.0.0 |
com.androID.support:design | com.Google.androID.material:material:1.0.0-rc01 |
com.androID.support:documentfile | androIDx.documentfile:documentfile:1.0.0 |
com.androID.support:drawerlayout | androIDx.drawerlayout:drawerlayout:1.0.0 |
com.androID.support:exifinterface | androIDx.exifinterface:exifinterface:1.0.0 |
com.androID.support:grIDlayout-v7 | androIDx.grIDlayout:grIDlayout:1.0.0 |
com.androID.support:heifwriter | androIDx.heifwriter:heifwriter:1.0.0 |
com.androID.support:interpolator | androIDx.interpolator:interpolator:1.0.0 |
com.androID.support:leanback-v17 | androIDx.leanback:leanback:1.0.0 |
com.androID.support:loader | androIDx.loader:loader:1.0.0 |
com.androID.support:localbroadcastmanager | androIDx.localbroadcastmanager:localbroadcastmanager:1.0.0 |
com.androID.support:media2 | androIDx.media2:media2:1.0.0-Alpha03 |
com.androID.support:media2-exoplayer | androIDx.media2:media2-exoplayer:1.0.0-Alpha01 |
com.androID.support:mediarouter-v7 | androIDx.mediarouter:mediarouter:1.0.0 |
com.androID.support:multIDex | androIDx.multIDex:multIDex:2.0.0 |
com.androID.support:multIDex-instrumentation | androIDx.multIDex:multIDex-instrumentation:2.0.0 |
com.androID.support:palette-v7 | androIDx.palette:palette:1.0.0 |
com.androID.support:percent | androIDx.percentlayout:percentlayout:1.0.0 |
com.androID.support:preference-leanback-v17 | androIDx.leanback:leanback-preference:1.0.0 |
com.androID.support:preference-v14 | androIDx.legacy:legacy-preference-v14:1.0.0 |
com.androID.support:preference-v7 | androIDx.preference:preference:1.0.0 |
com.androID.support:print | androIDx.print:print:1.0.0 |
com.androID.support:recommendation | androIDx.recommendation:recommendation:1.0.0 |
com.androID.support:recyclervIEw-selection | androIDx.recyclervIEw:recyclervIEw-selection:1.0.0 |
com.androID.support:recyclervIEw-v7 | androIDx.recyclervIEw:recyclervIEw:1.0.0 |
com.androID.support:slices-builders | androIDx.slice:slice-builders:1.0.0 |
com.androID.support:slices-core | androIDx.slice:slice-core:1.0.0 |
com.androID.support:slices-vIEw | androIDx.slice:slice-vIEw:1.0.0 |
com.androID.support:slIDingpanelayout | androIDx.slIDingpanelayout:slIDingpanelayout:1.0.0 |
com.androID.support:support-annotations | androIDx.annotation:annotation:1.0.0 |
com.androID.support:support-compat | androIDx.core:core:1.0.0 |
com.androID.support:support-content | androIDx.contentpager:contentpager:1.0.0 |
com.androID.support:support-core-ui | androIDx.legacy:legacy-support-core-ui:1.0.0 |
com.androID.support:support-core-utils | androIDx.legacy:legacy-support-core-utils:1.0.0 |
com.androID.support:support-dynamic-animation | androIDx.dynamicanimation:dynamicanimation:1.0.0 |
com.androID.support:support-emoji | androIDx.emoji:emoji:1.0.0 |
com.androID.support:support-emoji-appcompat | androIDx.emoji:emoji-appcompat:1.0.0 |
com.androID.support:support-emoji-bundled | androIDx.emoji:emoji-bundled:1.0.0 |
com.androID.support:support-fragment | androIDx.fragment:fragment:1.0.0 |
com.androID.support:support-media-compat | androIDx.media:media:1.0.0 |
com.androID.support:support-tv-provIDer | androIDx.tvprovIDer:tvprovIDer:1.0.0 |
com.androID.support:support-v13 | androIDx.legacy:legacy-support-v13:1.0.0 |
com.androID.support:support-v4 | androIDx.legacy:legacy-support-v4:1.0.0 |
com.androID.support:support-vector-drawable | androIDx.vectordrawable:vectordrawable:1.0.0 |
com.androID.support:swiperefreshlayout | androIDx.swiperefreshlayout:swiperefreshlayout:1.0.0 |
com.androID.support:textclassifIEr | androIDx.textclassifIEr:textclassifIEr:1.0.0 |
com.androID.support:Transition | androIDx.Transition:Transition:1.0.0 |
com.androID.support:versionedparcelable | androIDx.versionedparcelable:versionedparcelable:1.0.0 |
com.androID.support:vIEwpager | androIDx.vIEwpager:vIEwpager:1.0.0 |
com.androID.support:wear | androIDx.wear:wear:1.0.0 |
com.androID.support:webkit | androIDx.webkit:webkit:1.0.0 |
参考文章:
【google官方】androix包
【google官方】现有项目迁移教程
以上是内存溢出为你收集整理的python分析之androidX包差异全部内容,希望文章能够帮你解决python分析之androidX包差异所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)