error: package androidx.work does not exist
error: package androidx.work does not exist
我从 Android studio 创建了一个新项目,并在尝试使用 androidx.work 时看到错误 'error: package androidx.work does not exist'
我可以看到大多数其他 androidx 包,例如 activity、核心、加载器等,但就是看不到 'work'。有最新最好的更新。
项目gradle.properties
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
在您的应用级别使用以下库 gradle:
implementation 'androidx.work:work-runtime:2.0.1-rc01'
而不是
implementation 'android.arch.work:work-runtime:2.0.1-rc01'
我从 Android studio 创建了一个新项目,并在尝试使用 androidx.work 时看到错误 'error: package androidx.work does not exist'
我可以看到大多数其他 androidx 包,例如 activity、核心、加载器等,但就是看不到 'work'。有最新最好的更新。
项目gradle.properties
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
在您的应用级别使用以下库 gradle:
implementation 'androidx.work:work-runtime:2.0.1-rc01'
而不是
implementation 'android.arch.work:work-runtime:2.0.1-rc01'