1

What does my project is look like now you can see at the screenshot. And my gradle build file is listed below. The problem is not solved even after clicking update project in jetgradle. And I should notice that it is not android studio but clean IDEA 12.1.6

apply plugin: 'java'


allprojects {
    apply plugin: 'idea'
}

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.1'
    }
}

dependencies {
    compile project(':opp-client')
}

project(':opp-client') {

    apply plugin: 'android'

    repositories {
        mavenCentral()
        maven {
            url "https://oss.sonatype.org/content/repositories/snapshots/"
        }
        maven {
            url "https://github.com/dahlgren/vpi-aar/raw/master"
        }
    }

    dependencies {
        compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
        compile 'com.nineoldandroids:library:2.4.0'
        compile 'ch.acra:acra:4.5.0'
        compile 'com.googlecode.libphonenumber:libphonenumber:5.8'
        compile 'org.simpleframework:simple-xml:2.7.1'
        // compile 'com.viewpagerindicator:library:2.4.1@aar'
        compile 'org.roboguice:roboguice:2.0'
        compile 'com.google.code.findbugs:jsr305:2.0.2'
        compile 'com.google.guava:guava:14.0.1'
        // provided 'com.github.rchugunov:android:4.2-SNAPSHOT'
        compile 'com.github.rchugunov:android-support-v4:r18-SNAPSHOT'
        compile 'com.github.rchugunov:google-analytics:2.0-beta5-SNAPSHOT'
        compile 'com.github.rchugunov:flurry:3.2.2-SNAPSHOT'
        compile 'com.github.rchugunov:parse:1.3.0-SNAPSHOT'
        compile 'com.github.rchugunov:list-view-animations:1.0-SNAPSHOT'
        compile 'com.github.rchugunov:appcompat-v7:r19-SNAPSHOT@aar'
        compile 'com.github.rchugunov:swipelistview:1.0-SNAPSHOT@aar'
        compile 'com.viewpagerindicator:library:2.4.2-SNAPSHOT'
    }

    android {
        compileSdkVersion 18
        buildToolsVersion '18.0.1'

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

idea sccreenshot

4

1 回答 1

1

IntelliJ 12 中对 Gradle 的支持是有限的,大多数人使用 Gradle 的“idea”插件来生成 IntelliJ 项目文件,而不是使用 IntelliJ 的“JetGradle”插件。不过,我不知道这对 Android 项目的效果如何。IntelliJ 13 (EAP) 和 Android Studio(基于 IntelliJ 13)具有更好的 Gradle 支持。

于 2013-11-02T17:37:18.967 回答