kramer65 kramer65 - 2 months ago 9x
Android Question

How to add ActiveAndroid ORM to Gradle?

I'm building an Android app in which I want to use the ActiveAndroid ORM. In the readme I read instructions on how to include it in Maven or ADT, but I'm using/trying to learn Android Studio with Gradle. So I guess I need to insert ActiveAndroid as a dependency. in my build.gradle file on these lines:

dependencies {
compile ''

I don't really know what kind of string/url I should use so that Gradle can automatically find ActiveAndroid and compile it into my project.

Sicne I'm kinda lost; could anybody give me a tip here on how I should be tackling this?

I now build the jar and compiled it using the suggested
compile files('libs/ActiveAndroid.jar')
(I have no version name in my jar file). It now builds successfully, but I still cannot import classes from it. See the image below:
enter image description here


Give this a go - download the JAR from here

Add it to your libs folder.

Change your dependancies to look something like this

dependencies {
    compile ''

    compile files('libs/ActiveAndroid-3.3.jar')