Search code examples
androidocr

all com.android.support libraries must use the exact same version specification.Found versions 28.0.0, 26.1.0


Hi there i am making an app of extracting text from the image using OCR API of google. I am facing the problem in dependencies issue. I think there is a conflict in versions but i don't understand how to solve it.

I tried to update the google repository in SDK manager but still the problem has not solved.

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.android.gms:play-services-vision:17.0.2'
}

Solution

  • Add this line to your dependencies

    implementation "com.android.support:support-media-compat:28.0.0"
    implementation "com.android.support:support-v4:28.0.0"