Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 'com.android.support:appcompat-v7:+'
}

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?

[EDIT] 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

like image 806
kramer65 Avatar asked Dec 06 '22 03:12

kramer65


1 Answers

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 'com.android.support:appcompat-v7:+'

    compile files('libs/ActiveAndroid-3.3.jar') 
}
like image 197
Ben Pearson Avatar answered Dec 10 '22 13:12

Ben Pearson