所有 com.android.support 库必须使用完全相同的版本 specification.Found 版本 28.0.0、26.1.0

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

您好,我正在制作一个使用 google 的 OCR API 从图像中提取文本的应用程序。我面临依赖性问题。我认为版本有冲突,但我不知道如何解决。

我尝试更新 SDK 管理器中的 google 存储库,但问题仍未解决。

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'
}

将这一行添加到您的依赖项中

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