【发布时间】:2014-05-02 10:27:24
【问题描述】:
使用 Android Studio 0.4.6
我有以下 gradle.build 文件:
应用插件:'android'
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
}
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:19.0.0'
compile 'com.my.products.aproduct:aproduct.sdk.java:1.0.1-SNAPSHOT'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
构建项目时找不到jar:
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.my.products.aproduct:aproduct.sdk.java:1.0.1-SNAPSHOT.
Required by:
sva.frontend.android.jpurse:app:unspecified
虽然我可以在本地存储库 (~/.m2) 文件夹中找到 jar 和 pom 文件。我检查了 android studio 的 maven 设置,他们添加了一个指向 ~/.m2/repositories 的本地存储库
我还尝试在我的 gradle 文件中添加 mavenLocal() 甚至是存储库的硬编码路径。
我不知道可能出了什么问题?
【问题讨论】: