and: openHub, cp, along the way

dataautoaccess

https://github.com/ThirtyDegreesRay/DataAutoAccess

Here Insert Picture Description

dagger

Here Insert Picture Description

Change the package name

Here Insert Picture Description

Here Insert Picture Description

Visible script:
https://gitee.com/paulkg12/a_script_repo/issues/I1BG34

Migrating to androidx

Here Insert Picture Description

you got:

Here Insert Picture Description

support package is not replaced by ah!

Your reference

https://developer.android.google.cn/jetpack/androidx/migrate/class-mappings

To change it yourself.

Here Insert Picture Description

ref

https://www.jianshu.com/p/41de8689615d

Migration Considerations

a partial migration — using both AndroidX and the Support Libraries — will cause failures.

Here you can see the updated string some standard library

https://github.com/android/plaid/pull/524

import androidx.recyclerview.widget.RecyclerView;

<androidx.drawerlayout.widget.DrawerLayout

Some mapping string

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

You can refer to the following to be renamed

Here Insert Picture Description

color resources:

Android Studio 3.6 upgrade resource file error The layout xx in layout has no declearation in the base layout folder

Here Insert Picture Description

contentProvider

https://developer.android.google.cn/reference/androidx/core/content/FileProvider?hl=zh-cn

Here Insert Picture Description

Here Insert Picture Description

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
来源:掘金
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
Published 216 original articles · won praise 33 · views 90000 +

Guess you like

Origin blog.csdn.net/paulkg12/article/details/104816068