Hi,there.
I’m sorry for suddenly posting.
I want to build project including my custom android libraly.
My custom libraly project is located on my github.
My library project’s gradle file is below code.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
apply plugin: 'com.android.library'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:13.0.+'
}
android {
compileSdkVersion 7
buildToolsVersion "19.1.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
versionCode 1
versionName "1.0"
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
def repo = new File(rootDir, "repository")
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository url: "file://${repo.absolutePath}"
pom.version = '1.0.0' // version
pom.groupId = 'com.costum.android.widget' // グループ名
pom.artifactId = 'pulltorefresh-and-loadmore-release' // ライブラリ名
}
}
}
I created aar file.then i commit and push my lib’s project to github.
Then,I tryed to use above library.However i didn’t get to build by gradle.
Here is error message.
[Fatal Error] pulltorefresh-and-loadmore-release-1.0.0.pom:5:10: DOCTYPEはすでに存在します。
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_stagingDebugCompile'.
> Could not resolve com.costum.android.widget:pulltorefresh-and-loadmore-release:1.0.0.
Required by:
shotalertandroid:app:unspecified
> Could not parse POM https://github.com/shiratsu/android-pulltorefresh-and-loadmore/tree/master/pulltorefresh-and-loadmore/repository/com/costum/android/widget/pulltorefresh-and-loadmore-release/1.0.0/pulltorefresh-and-loadmore-release-1.0.0.pom
> DOCTYPEはすでに存在します。
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 11.328 secs
Android project gradle file is following code.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url "https://github.com/shiratsu/android-pulltorefresh-and-loadmore/tree/master/pulltorefresh-and-loadmore/repository" }
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "jp.co.indival.shotalert"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//プロダクトフレーバーブロック
productFlavors {
//ステージングとリリースで切り替える
develop {
buildConfigField "int", "SERVER_ENVIRONMENT", "1"
}
staging {
buildConfigField "int", "SERVER_ENVIRONMENT", "2"
}
production {
buildConfigField "int", "SERVER_ENVIRONMENT", "3"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'io.realm:realm-android:0.79.0'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'org.apache.commons:commons-lang3:3.1'
compile 'com.costum.android.widget:pulltorefresh-and-loadmore-release:1.0.0'
compile('com.crashlytics.sdk.android:crashlytics:2.2.2@aar') {
transitive = true;
}
}
libraries github repo is here.
What is this problem?