我要迁移到android studio。
我想使用这个lib:
https://codeload.github.com/flavienlaurent/datetimepicker/zip/master
本教程之后:
现在我收到了这个错误:
错误:无法找到:com.nineoldandroids:library:2.4.0
build.gradle:
apply plugin: 'com.android.library'
repositories {
mavenCentral()
}
dependencies {
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:support-v4:20.0.0'
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 11
targetSdkVersion 19
versionName rootProject.versionName
versionCode rootProject.versionCode
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
//apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
更新
我的所有错误:
答案 0 :(得分:5)
更新此
dependencies {
compile 'com.nineoldandroids:library:2.4.0+'
}
然后 Gradle 您的项目
答案 1 :(得分:3)
实际上很简单,只是过去了
repositories {
mavenCentral()
}
到项目的 build.gradle (而不是模块的build.gradle)