本文介绍了不要在Android Studio中使用GitHub的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请勿在Android Studio
中使用GitHub中的。 gradle(:project):
apply plugin:'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion23.0.1
defaultConfig {
applicationIdcom.example.mymaterialdialogs
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName1.0
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'' proguard-rules.pro'
}
}
}
依赖关系{
编译fileTree(dir:'libs',include:['* .jar'])
testCompile'junit:junit:4.12'
compile'com.android.support:appcompat-v7:23.0.1'
compile('com.afollestad.material-dial ogs:core:0.8.4.2@aar'){
transitive = true
}
}
和我的build.gradle(:app):
buildscript {
repositories {
maven {urlhttps://jitpack.io}
}
依赖关系{
classpath'com.android.tools.build:gradle:1.3.0'
$ b b
allprojects {
repositories {
jcenter()
}
}
任务清理(类型:删除){
delete rootProject.buildDir
}
显示此错误:
解决方案
执行以下步骤:
$ b $ 1.在你的build.gradle(:项目)在依赖关系之前添加以下内容ies
存储库{
maven {urlhttps://jitpack.io}
code>
}
依赖关系{
compile fileTree(dir:'libs',include:['* .jar'])
testCompile'junit:junit:4.12'
compile'com.android.support:appcompat-v7 :23.0.1'
compile('com.afollestad.material-dialogs:core:0.8.4.2@aar'){
transitive = true
}
}
2.在您的build.gradle(:app)中:replace
maven {urlhttps://jitpack.io} with jcenter()
3.Sync项目
希望这有助于您。
Don't working this library from GitHub in Android StudioMy build.gradle(:project):
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.mymaterialdialogs"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile('com.afollestad.material-dialogs:core:0.8.4.2@aar') {
transitive = true
}
}
And My build.gradle(:app):
buildscript {
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Show this Error:
解决方案
Do the following steps:
1.In your build.gradle(:project) Add the following before dependencies
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile('com.afollestad.material-dialogs:core:0.8.4.2@aar') {
transitive = true
}
}
2.In your build.gradle(:app): replace
maven { url "https://jitpack.io" } with jcenter()
3.Sync project
Hope this helps.
这篇关于不要在Android Studio中使用GitHub的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!