Search code examples
androideclipseandroid-gradle-pluginbuild.gradlegradle-eclipse

Gradle Eclipse Android autocomplete


I currently trying to switch my android maven project over to gradle. Currently everything is building fine but i am having trouble with autocomplete and using any shorts cuts. Its really slowing down development.

I am pretty sure its something to do with my build path i notice there is no android.jar in my build path

 buildscript {
     repositories {
        mavenCentral()
     }
     dependencies {
        classpath 'com.android.tools.build:gradle:0.10.+'
     }
}

 apply plugin: 'android'

repositories {
    mavenCentral()
}

dependencies {
compile files('libs/android-support-v4.jar')
compile ('com.github.chrisbanes.actionbarpulltorefresh:extra-abs:+')
compile ('org.codehaus.jackson:jackson-core-asl:1.9.13')
compile ('org.codehaus.jackson:jackson-mapper-asl:1.9.13')
compile ('org.springframework.android:spring-android-core:1.0.1.RELEASE')
compile ('org.springframework.android:spring-android-rest-template:1.0.1.RELEASE')
 }

android {
buildToolsVersion "19.0"
compileSdkVersion 19

 sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
    }

    dexOptions {
        preDexLibraries = false
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }

    instrumentTest.setRoot('tests')
   }

    signingConfigs {
    debug {
        storeFile file("C:/Users/..../.android/debug.keystore")
        storePassword "...."
        keyAlias "......"
        keyPassword "...."
    }

    release {
        storeFile file("C:/Users/..../.android/release.keystore")
        storePassword "....."
        keyAlias "....."
        keyPassword "....."
    }
  }

  buildTypes {
    debug {
        signingConfig signingConfigs.debug
    }
    release {
        signingConfig signingConfigs.release
    }
   }

 task wrapper(type: Wrapper) {
gradleVersion = '1.12'
  }
  } 

enter image description here

My project set up and i have installed nodeeclipse and enide gradle editor in my eclipse workspace


Solution

  • I'd suggest you not use eclipse, and instead use Android Studio. It really is a superior tool, with a very strong Android/Gradle integration.