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

user9289038
  • 3
  • 1
  • 4

3 Answers3

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

rupinderjeet
  • 2,984
  • 30
  • 54
1

You need this :

implementation 'com.android.support:support-compat:26.1.0'
Thomas Mary
  • 1,535
  • 1
  • 13
  • 24
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.

Tertium
  • 6,049
  • 3
  • 30
  • 51