android - 错误 :(23, 20) 无法解析 : com. github.chrisbanes :PhotoView:2. 1

标签 android

我想在 android 中使用 PhotoView 进行缩放 https://github.com/chrisbanes/PhotoView 但我收到以下错误

dependencies {
    implementation 'com.github.chrisbanes:PhotoView:2.1.3 '//zoom
    implementation 'com.android.support:support-v4:26.0.2 '
}

根级别 build.gradle

allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

最佳答案

确保,您在根级别 build.gradle 部分中添加了它。

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

之后,Clean-Rebuild-Run

演示

buildscript {

    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'

    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

关于android - 错误 :(23, 20) 无法解析 : com. github.chrisbanes :PhotoView:2. 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48204743/

相关文章:

android - 撰写 AlertDialog 不关闭

android - 搜索小部件调用 OnNewIntent 两次

Android - 折叠工具栏中未显示溢出菜单和后退按钮

android - 如果 App 进程被终止,bundle 如何发送到 onCreate?

java - 奇怪的 httpPost 行为(可能与 json、auth、代理相关)GET 有效,POST 有效,但没有代理就不行(部分解决)

java - 我想在我的 android 代码中实现记住我的功能,但我不知道从哪里开始

android - 使用 calabash-android 获取元素的颜色

android - 将 Flutter 连接到真实设备中的本地主机服务器

android - 谷歌地图 Android API keystore

android - TabLayout 图标不显示