文章目录
dataautoaccess
https://github.com/ThirtyDegreesRay/DataAutoAccess
dagger
改包名
脚本可见:
https://gitee.com/paulkg12/a_script_repo/issues/I1BG34
迁移到androidx
you got:
support 包还是没换成啊!
你参考
https://developer.android.google.cn/jetpack/androidx/migrate/class-mappings
来自己换吧。
ref
https://www.jianshu.com/p/41de8689615d
迁移的注意事项
a partial migration — using both AndroidX and the Support Libraries — will cause failures.
你在这里可以看到一些标准库的更新后的字符串
https://github.com/android/plaid/pull/524
import androidx.recyclerview.widget.RecyclerView;
<androidx.drawerlayout.widget.DrawerLayout
一些映射字符串
android.support.annotation : androidx.annotation
android.support.v7.app.AlertDialog: androidx.appcompat.app.AlertDialog
android.support.design.widget.CollapsingToolbarLayout:com.google.android.material.appbar.CollapsingToolbarLayout
android.support.design.widget.AppBarLayout: com.google.android.material.appbar.AppBarLayout
android.support.v7.app.AppCompatActivity: androidx.appcompat.app.AppCompatActivity
android.support.v7.widget.Toolbar: androidx.appcompat.widget.Toolbar
android.support.v4.app.Fragment: androidx.fragment.app.Fragment
你可以参考以下 来改名
color资源问题:
升级Android Studio 3.6 资源文件报错 The layout xx in layout has no declearation in the base layout folder
contentProvider
https://developer.android.google.cn/reference/androidx/core/content/FileProvider?hl=zh-cn
https://juejin.im/post/5cdff09851882568576d0434
FileProvider 适配文件
文件地址 res/xml/file_paths.xml
空文件内容如下
<?xml version="1.0" encoding="utf-8"?>
<paths>
</paths>
复制代码里面的具体配置为,Android Studio 提示为这五个地方。
<files-path name="name" path="path" />
<cache-path name="name" path="path" />
<external-path name="name" path="path" />
<external-files-path name="name" path="path" />
<external-cache-path name="name" path="path" />
作者:牧码人酱
链接:https://juejin.im/post/5cdff09851882568576d0434
来源:掘金
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。