【发布时间】:2018-12-07 11:05:16
【问题描述】:
我在 github 上构建并添加了带有演示的 this 库。现在,我正在尝试将其导入其他项目。
以下是我未编译的 gradle 文件。
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
和
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.mayank.myapplication"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.github.mayank1513:SP_DrawerLayout:1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
我看了以下答案
Error:(23, 20) Failed to resolve: com.github.chrisbanes:PhotoView:2.1
Android Studio Failed to resolve:com.github.PhilJay:MPAndroidChart:v2.1.3
我仍然无法解决问题。 Gradle 同步失败并出现错误
无法解决:com.github
【问题讨论】:
-
关于jitpack,如果你需要帮助,我建议你直接告诉他们。他们是好人。