Failed to resolve: com.github

来源:互联网 发布:阿里云主页 编辑:程序博客网 时间:2024/05/17 22:28

运行别人的Demo后报错:

Failed to resolve: com.github.yangjie10930:EpMedia:v0.8.2

这里写图片描述

解决办法:
1 在Project的build.gradle中加入

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

完整版

buildscript {    repositories {        jcenter()    }    dependencies {        classpath 'com.android.tools.build:gradle:2.3.3'        // NOTE: Do not place your application dependencies here; they belong        // in the individual module build.gradle files    }}allprojects {    repositories {        jcenter()        maven { url "https://jitpack.io" }    }}task clean(type: Delete) {    delete rootProject.buildDir}

2 在module中加入

 compile ('com.github.yangjie10930:EpMedia:v0.8.2'){        transitive = true    }

完整版

apply plugin: 'com.android.application'android {    compileSdkVersion 25    buildToolsVersion "25.0.0"    defaultConfig {        applicationId "com.joe.epmediademo"        minSdkVersion 18        targetSdkVersion 25        versionCode 1        versionName "1.0"        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }    }}dependencies {    compile fileTree(dir: 'libs', include: ['*.jar'])    compile 'com.android.support:appcompat-v7:25.1.0'    compile 'com.android.support:support-v4:25.1.0'    compile 'com.android.support.constraint:constraint-layout:1.0.2'    compile ('com.github.yangjie10930:EpMedia:v0.8.2'){        transitive = true    }    testCompile 'junit:junit:4.12'}
阅读全文
0 0
原创粉丝点击