0

I need to write a small library with submodules. When i try sync my project i get error.

if i use gradle gradle:1.0.1

Error:Configuration with name 'default' not found.

if build:gradle:1.2.3

Error:Cause: failed to find target 21 

but this sdk already installed. Here is my build.gradle

uildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
    }
}

apply plugin: 'com.android.library'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        minSdkVersion 9
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile project(':libs:UniversalImageLoader')
}

project(':libs:UniversalImageLoader') {
    apply plugin: 'com.android.library'
    android.compileSdkVersion = 21
    android.buildToolsVersion = "21.1.2"
    android.sourceSets.main {
        manifest.srcFile 'library/AndroidManifest.xml'
        java.srcDirs = ['library/src']
        res.srcDirs = ['library/res']
    }
}

Any ideas on this subject? Thx for help.

Tiberal
  • 410
  • 2
  • 6
  • 16

0 Answers0