Reputation: 991
I'm trying to compile the anko-test project (https://github.com/yanex/anko-example.git) but gradle can't resolve the dependency to the library :
Error: A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find org.jetbrains.anko:anko-sdk15:0.9.1.
Required by:
anko-example:app:unspecified
here's my gradle file :
buildscript {
ext.kotlin_version = '1.0.5-2'
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "org.example.ankodemo"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.1.1'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'org.jetbrains.anko:anko-sdk15:0.9.1'
}
I haven't change anything after cloning the project, any Idea what's going on?
Upvotes: 1
Views: 1010
Reputation: 9868
Looks to be a known issue (that dependency hasn't been synced to jcenter yet).
Temporary solution is to add the anko bintray repository to your root build.gradle
file:
allprojects {
repositories {
jcenter()
maven { url 'https://dl.bintray.com/jetbrains/anko' }
}
}
Upvotes: 2