Ash*_*i K 5 android gradle maven android-studio build.gradle
我在链接后在BitBucket上创建了一个自定义maven仓库.当我尝试使用Gradle在我的android项目中使用依赖项时,我收到以下错误
Executing tasks: [:app:compileDebugJava]
Configuration on demand is an incubating feature.
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
Checksum missing at https://bitbucket.org/test/maven-repo/raw/master/repository/com/test/com/testCommon/1.0/testCommon-1.0.pom.sha1 due to: For input string: "<!"
Download https://bitbucket.org/test/maven-repo/raw/master/repository/com/test/com/testCommon/1.0/testCommon-1.0.pom
[Fatal Error] testCommon-1.0.pom:2:10: Already seen doctype.
Checksum missing at https://bitbucket.org/test/maven-repo/raw/master/repository/com/android/support/support-v4/20.0.0/support-v4-20.0.0.pom.sha1 due to: For input string: "<!"
Download https://bitbucket.org/test/maven-repo/raw/master/repository/com/android/support/support-v4/20.0.0/support-v4-20.0.0.pom
[Fatal Error] support-v4-20.0.0.pom:2:10: Already seen doctype.
Checksum missing at https://bitbucket.org/test/maven-repo/raw/master/repository/com/android/support/support-annotations/20.0.0/support-annotations-20.0.0.pom.sha1 due to: For input string: "<!"
Download https://bitbucket.org/test/maven-repo/raw/master/repository/com/android/support/support-annotations/20.0.0/support-annotations-20.0.0.pom
[Fatal Error] support-annotations-20.0.0.pom:2:10: Already seen doctype.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not resolve com.test.com:testCommon:1.0.
Required by:
SettingsAid:app:unspecified
> Could not parse POM https://bitbucket.org/test/maven-repo/raw/master/repository/com/test/com/testCommon/1.0/testCommon-1.0.pom
> Already seen doctype.
Run Code Online (Sandbox Code Playgroud)
我已经改变了链接.但是直接打开链接会返回校验和.
下面是我的build.gradle
apply plugin: 'com.android.application'
apply plugin: 'maven'
android {
compileSdkVersion 19
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.test.sampleapp"
minSdkVersion 11
targetSdkVersion 19
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
repositories {
mavenCentral()
maven {
credentials {
username "test@gmail.com"
password "test"
}
url "https://bitbucket.org/test/maven-repo/raw/master/repository/"
}
}
dependencies {
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.test.com:testCommon:1.0'
compile files('libs/GoogleAdMobAdsSdk-6.4.1.jar')
}
Run Code Online (Sandbox Code Playgroud)
我不确定我在这里做错了什么.我也跟着这个链接.任何人都可以帮我解决这个问题.
更新1:
当我检查〜.gradle文件夹时,即使在提供凭据后它也没有登录并保存整页.当我将我的repo从私有更改为public时,代码开始工作.但我不想让我的回购公开.如何让gradle使用传递的登录凭据?
谢谢.
| 归档时间: |
|
| 查看次数: |
9281 次 |
| 最近记录: |