如何将ActiveAndroid ORM添加到Gradle? [英] How to add ActiveAndroid ORM to Gradle?

查看:178
本文介绍了如何将ActiveAndroid ORM添加到Gradle?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个Android应用,我希望使用



将它添加到libs文件夹中。



更改您的依赖关系以查看像这样

 依赖关系{
compile'c​​om.android.support:appcompat-v7:+'

编译文件('libs / ActiveAndroid-3.3.jar')
}


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:

解决方案

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') 
}

这篇关于如何将ActiveAndroid ORM添加到Gradle?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆