0

Following build.gradle configuration on my project

compileSdkVersion 27
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.android.tt"
    minSdkVersion 16
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    multiDexEnabled true
    generatedDensities = []
}

And Following support library i have compiled

compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'

When i have trying to import JobIntentService class its not resolve.Below link to i am trying to implement

JobIntentService

1
  • for androidx: implementation 'androidx.core:core:1.0.1' Jan 20, 2019 at 13:50

3 Answers 3

9

JobIntentService was added in support library version 26.1.0 from package com.android.support:support-compat.

So, update your gradle version for support library.

For AndroidX:

implementation 'androidx.core:core:1.0.1'

Latest stable version is available in Release Notes

3
  • Thank you @rupinderjeet for save my day. Feb 5, 2018 at 11:12
  • 1
    @user9289038 While at it, make sure your support library version matches your compile SDK version. Feb 5, 2018 at 13:01
  • compile SDK version 27 and support library version now 27.0.2 Feb 5, 2018 at 13:38
1

You need this :

implementation 'com.android.support:support-compat:26.1.0'
0
0

In my case implementation 'com.android.support:support-compat:26.1.0' caused many error messages about incompability, so

implementation "com.android.support:support-v4:<you_target_platform_ver>"

helped.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.