zoukankan      html  css  js  c++  java
  • Android Studio错误:Failed to resolve: com.github.zhpanvip:BannerViewPager:latestVersion

    报错原因是找不到这个依赖

    解决方法

    1、添加仓库,我加粗的那两句话。

    buildscript {
        repositories {
            // 以下四行添加阿里云的仓库地址,方便国内开发者下载相关插件
            maven { url 'https://maven.aliyun.com/repository/jcenter' }
            maven { url 'https://maven.aliyun.com/repository/google'}
            maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
            maven { url 'https://maven.aliyun.com/repository/public'}
            google()
    //        jcenter()
            maven { url 'https://jitpack.io' }
            
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.5.3'
            
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            // 以下四行添加阿里云的仓库地址,方便国内开发者下载相关插件
            maven { url 'https://maven.aliyun.com/repository/jcenter' }
            maven { url 'https://maven.aliyun.com/repository/google'}
            maven { url 'https://maven.aliyun.com/repository/gradle-plugin'}
            maven { url 'https://maven.aliyun.com/repository/public'}
            google()
    //        jcenter()
            maven { url 'https://jitpack.io' }
            
        }
    }

    2、添加依赖——这样插入是错误的。将latestVersion改为最近的版本号

    implementation 'com.github.zhpanvip:bannerviewpager:latestVersion'

    正确写法

        implementation 'com.github.zhpanvip:bannerviewpager:3.5.4'
  • 相关阅读:
    fastcgi性能调优(转)
    nginx location配置(转)
    elasticsearch配置文件详解(转)
    linux常用信号集
    phpstorm快捷键总结
    浅谈MVC中的service层(转)
    php中的内存管理的介绍(转)
    使用C语言开发PHP扩展(转)
    Linux恢复误删除的文件或者目录(转)
    笔记整理3——python实现MAC分析地理位置
  • 原文地址:https://www.cnblogs.com/hahayixiao/p/15527277.html
Copyright © 2011-2022 走看看