本文介绍了当我添加RoboBlender时,Gradle项目无法构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将RoboGuice 3依赖项添加到我的gradle构建文件中,该文件可以编译并运行,但是由于NoClassDefFoundError:AnnotationDatabaseImpl,应用程序崩溃了。有研究表明,RoboBlender是生成该定义所必需的(我熟悉RoboGuice 2,它不需要RoboBlender),但是当我添加RoboBlender时,该项目将不再构建。

I have added RoboGuice 3 dependency into my gradle build file it compiles and runs, however the application crashes because of NoClassDefFoundError: AnnotationDatabaseImpl. Did some research that suggested that RoboBlender was necessary to generate the definition (I'm familiar with RoboGuice 2 which does not require RoboBlender) but when I add RoboBlender the project no longer builds.

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:cardview-v7:21.0.+'
compile 'com.android.support:recyclerview-v7:21.0.+'
compile 'com.koushikdutta.urlimageviewhelper:urlimageviewhelper:1.0.4'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.getbase:floatingactionbutton:1.4.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'org.twitter4j:twitter4j-core:4.0.2'
compile files('libs/json-me.jar')
compile files('libs/twitter_api_me-1.9.jar')
compile('ch.acra:acra:4.5.0') {
    exclude group: 'org.json'
}
compile 'org.roboguice:roboguice:3.0.1'
provided 'org.roboguice:roboblender:3.0.1'

}

Build错误:

 Error:Execution failed for task ':app:compileDebugJava'.



是什么原因造成的,我该如何解决?

Whats causing this and how can I fix it?

推荐答案

我发现了一个解决方法,我只是禁用了AnnotationDatabase处理并删除了RoboBlender依赖性,从而解决了我的问题。我仍然想知道为什么我会首先遇到这个问题。

Well I found a workaround, I just disabled AnnotationDatabase processing and removed RoboBlender dependency and that fix my problem. I would still like to know why I'm having this problem in the first place.

这篇关于当我添加RoboBlender时,Gradle项目无法构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-30 06:33