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'
  • 相关阅读:
    Oracle数据库
    Python-aiohttp百万并发
    Sentry的安装搭建与使用
    traceroute命令初探
    Python中断言与异常的区别
    二十三种设计模式及其python实现
    Celery
    SQLAlchemy
    python里使用reduce()函数
    python实现栈
  • 原文地址:https://www.cnblogs.com/hahayixiao/p/15527277.html
Copyright © 2011-2022 走看看