Building Android project

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Building Android project

urushi
This post has NOT been accepted by the mailing list yet.
Im trying to build a simple android app using gradle build tools. I create a simple application name 'ImageSDcard' but im getting an error when i try to run the script 'gradle build'

here's the error message :

* What went wrong:
A problem occurred evaluating root project 'ImageSdcard'.
> taskdef class com.android.ant.NewSetupTask cannot be found
   using the classloader AntClassLoader[/home/user/android-sdk-linux/tools/lib/anttasks.jar:/home/user/android-sdk-linux/tools/lib/common.jar:/home/user/android-sdk-linux/tools/lib/sdklib.jar:/home/user/android-sdk-linux/tools/lib/androidprefs.jar:/home/user/android-sdk-linux/tools/lib/mkidentity.jar:/home/user/android-sdk-linux/tools/lib/commons-compress-1.0.jar:/home/user/android-sdk-linux/tools/lib/httpclient-4.1.1.jar:/home/user/android-sdk-linux/tools/lib/httpcore-4.1.jar:/home/user/android-sdk-linux/tools/lib/httpmime-4.1.1.jar:/home/user/android-sdk-linux/tools/lib/commons-logging-1.1.1.jar:/home/user/android-sdk-linux/tools/lib/commons-codec-1.4.jar:/home/user/android-sdk-linux/tools/lib/manifmerger.jar]

* 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: 4.925 secs

here's also my script
build.gradle

buildscript {
        repositories {
                mavenCentral()
        }
   
         dependencies {
        classpath 'org.gradle.api.plugins:gradle-android-plugin:1.1.0'
 
     }
}

apply plugin: 'android'
apply plugin: 'eclipse'

repositories {
        mavenCentral()
}

defaultTasks : 'androidPackage'

dependencies {
}

sourceSets {
    main {
        java {
            srcDir 'src'
        }
    }
}

processResource {
        expand (project.properties)
}

task configureDebug << {
        jar.classifier = "debug"
}

task configureRelease << {
        proguard.enabled = true
}