无法解决:exifinterface

Mad*_*ddy 4 android gradle picasso android-gradle-plugin

当我将 picasso 从 2.5.2 升级到 2.71828 并执行 gradle 同步时,我看到 aa exifinterface 错误:

错误:

Failed to resolve: exifinterface
Run Code Online (Sandbox Code Playgroud)

已更换

implementation 'com.squareup.picasso:picasso:2.5.2'
Run Code Online (Sandbox Code Playgroud)

implementation 'com.squareup.picasso:picasso:2.71828'
Run Code Online (Sandbox Code Playgroud)

Rad*_*esh 7

Picasso 有依赖项,exifinterface因此您必须将其添加到您的依赖项中

implementation 'com.android.support:exifinterface:28.0.0'
Run Code Online (Sandbox Code Playgroud)

如果您使用androidX,请将其添加到您的dependencies

implementation "androidx.exifinterface:exifinterface:1.0.0"
Run Code Online (Sandbox Code Playgroud)


Int*_*iya 0

如果您正在使用支持库,您应该使用解决策略来强制它们全部使用相同的版本。

configurations.all {
  resolutionStrategy {
    eachDependency { details ->
        if (details.requested.group == 'com.android.support') {
        details.useVersion versions.supportLibrary
      }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

ExifInterface Support Library将以下依赖项添加到您的项目中:

implementation "com.android.support:exifinterface:27.1.0"
Run Code Online (Sandbox Code Playgroud)