2017-12-11 17 views
1

설명 할 수없는 매우 이상한 문제가 있습니다.Android Studio는 jCenter 또는 Maven Central에서 종속성을 가져 오지 않습니다.

implementation 'com.github.kostasdrakonakis:spinner-preference:1.0.0' 

또는 내가 안드로이드 스튜디오에서 내 프로젝트의 종속성을 추가하고 그것을 다운로드하지 않습니다 3.0

compile 'com.github.kostasdrakonakis:spinner-preference:1.0.0' 

Gradle을 <에 대한 :이 같은 액세스 할 수있는 두 jCenter에서 라이브러리와 Maven Central이 .

내 애플/build.gradle :

dependencies { 
    implementation fileTree(includes: ['*.jar'], dir: 'libs') 
    implementation 'com.github.kostasdrakonakis:spinner-preference:1.0.0' 
    api project(':databasemanager') 
    implementation 'com.android.support:appcompat-v7:26.1.0' 
    implementation 'com.android.support:support-v4:26.1.0' 
    implementation 'com.android.support:cardview-v7:26.1.0' 
    implementation 'com.android.support:recyclerview-v7:26.1.0' 
    implementation 'com.android.support:design:26.1.0' 
    implementation 'de.greenrobot:greendao:2.1.0' 
} 

루트 프로젝트에 대한 나의 build.gradle :

buildscript { 
    repositories { 
     jcenter() 
     mavenCentral() 
     google() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.1' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
     mavenCentral() 
     google() 
    } 
} 

외부 라이브러리 :

enter image description here

무엇이고 어떤 아이디어 사고?

+0

당신의 의존성이 나를 위해 작동하는 것 같습니다. 프로젝트를 마우스 오른쪽 단추로 클릭하고 모듈 설정 열기를 선택한 다음 종속성 탭을 선택하면 어떻게됩니까? – nicobatu

+0

프로젝트에서 잘 볼 수 있습니까? – matrix

+0

@nicobatu 일반적으로 메이븐 (maven)과 같은 종속성을 보지만 여전히 프로젝트에서 클래스에 인식되지 않습니다. – matrix

답변

1
+0

aar로 추가하는 방법은 무엇입니까? https://docs.gradle.org/current/userguide/maven_plugin.html#sec:maven_pom_generation 예를 들면 : 당신 받는다는 배포 스크립트에서 – matrix

+0

, 당신은'packaging' 유형을 지정할 수 있습니다 '포장'aar'' – nicobatu

+0

을 나는 지금 그것을 고쳤지만 여전히 개선을 보지 못했다. – matrix