I want to build project including my custom android library

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?

There seems to be an encoding issue here. Can you try to set the file encoding properly using file.encoding=UTF8 system property?

Thank you for replying.
I tryed to write the following code at build.gradle.
is it correct?

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

allprojects {
    repositories {
        jcenter()
    }
    tasks.withType(JavaCompile) {
        options.encoding = 'UTF-8'
    }
}

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/maven-repo/" }
}


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:pullandloadmore-aar:1.0'
    compile('com.crashlytics.sdk.android:crashlytics:2.2.2@aar') {
        transitive = true;
    }
}

And,gradle.properties

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
JAVA_OPTS=-Dgroovy.source.encoding=UTF-8 -Dfile.encoding=UTF-8

However,result did not change.
By the way my environment is mac os x.OS is Yosemite.