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


#1

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.


#2

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?


#3

Just tried that, the error message just changed the version number. ::cry:


#4

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!


#5

:star_struck:

Great ! Happy to hear that. Have fun with Countly!