I'm having some trouble compiling my app with the Android SDK

I'm trying to follow the directions I got to install countly on my Android application.

I've added :

buildscript {
repositories {
maven {
url "http://dl.bintray.com/countly/maven"
}
}
}

dependencies {
compile 'ly.count.android:sdk:18.01'
}

to my build.gradle and the result from the Android Studio compiler is:

Could not find method compile() for arguments [ly.count.android:sdk:18.01] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

I'm not sure what to check to fix this. I can't compile / sync gradle with it there.

0

Comments

4 comments
  • Not sure if that is the case (and I am just guessing) - current Android version is 18.04 and not 18.01..

    Could be of help?

    0
    Comment actions Permalink
  • Just tried that, the error message just changed the version number. :😢

    0
    Comment actions Permalink
  • I figured it out, and I feel embarrassed. I should have read more closely!! I put the compile line in the project-level gradle, and not the app-level gradle.build file.

    I moved it, and everything's working now. Thanks for this great tool!

    0
    Comment actions Permalink
  • Great ! Happy to hear that. Have fun with Countly!

    0
    Comment actions Permalink

Please sign in to leave a comment.