gpt4 book ai didi

android错误找不到类JobSchedular

转载 作者:行者123 更新时间:2023-11-29 23:56:31 24 4
gpt4 key购买 nike

我正在使用 android studio 3.1。这是我的构建文件

compileSdkVersion 26
defaultConfig {
applicationId "com.example.appcomponentexample"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

我得到错误:

cannot find symbol class JobSchedular

当我使用 JobSchedular 类尝试构建时。我不知道出了什么问题。

最佳答案

cannot find symbol class JobSchedular

当您没有正确导入 JobSchedular 时发生。将导入语句添加到您的类中:

导入android.app.job.JobScheduler;

由于从 5.0 开始支持 JobScheduler,因此请牢记对向后可比性的考虑。引用这个SO了解更多详情。

关于android错误找不到类JobSchedular,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50322519/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com