更新时间:2021-12-13 06:14:07
SDK 17版本增加了UserManager,所以找不到.您可以查看此链接了解详情.
the UserManager is added in SDK version of 17, so it can not find it. you can see this link for details.
如果你想使用它,你必须在android native中添加支持库.com.android.support:support-compat:28.0.0-alpha1
有它.
if you want to use it, you have to in the android native add support library. the com.android.support:support-compat:28.0.0-alpha1
has it.
如果您添加了 androidX 库,您应该将类更改为 UserManagerCompat
.有关详细信息,您可以进入此链接它位于 androidX.core
中.在 android/app/build.gradle
if you have added the androidX library, you should change the class to UserManagerCompat
. for details, you can go into this link
it is located in androidX.core
. add the following at android/app/build.gradle
def core_role_version = "1.0.0-alpha01"
implementation "androidx.core:core-role:$core_role_version"