Dependency problem with Android Studio and gradle Plugin

asked 2014-08-15 07:17:50 -0600

christian.blesing gravatar image

updated 2014-08-15 07:45:28 -0600

gvdhoorn gravatar image

Hi,

i am very new to Andriod Studio in combination with the gradle plugin. i have followed the instructions from the "Building A ROS Android App" tutorial. I have compiled and executed the existing examples. Everything works fine.

Then i have tryed to build my own app according to the same tutorial. So i put the existing code (from the tutorial) in a new project and adapt the AndroidManifest.xml the activity_main.xml and in addtion to this the build.gradle file.

Here is my gradle file:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.12.2'
        compile 'ros.android_core:android_honeycomb_mr2:0.0.0-SNAPSHOT'
    }
}

apply plugin: 'com.android.application'

repositories {
    jcenter()
}

android {
    compileSdkVersion 'android-L'
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "seminararbeit.fpv.myapploication"
        minSdkVersion 15
        targetSdkVersion 18
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}

When i try to compile it there appears a gradle error:

Build script error, unsupported Gradle DSL method found: 'compile()'!

This error refer to the line "compile 'ros.android_core:android_honeycomb_mr2:0.0.0-SNAPSHOT'"

If i don't put that line into the gradle file all the ros specific imports would not be solved.

Can someone help me to get this to work?

Thanks

edit retag flag offensive close merge delete