无法使用当前运行时配置

时间:2016-01-08 10:52:41

标签: android android-studio gradle roboguice

Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.CommonsLogLogChute with the current runtime configuration.

将gradle的配置从目标22更改为目标23时出现错误。 不知道那是什么意思吗?

相关的build.gradle部分

{
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "com.my.package.app"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 4
        versionName "1.0"
        multiDexEnabled true
    }

提前感谢任何试图提供帮助的人

编辑:依赖

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    provided 'org.roboguice:roboblender:3.+'
    compile 'org.roboguice:roboguice:3.+'
}

更新: 问题与roboguice库有关

1 个答案:

答案 0 :(得分:0)

在您的应用级别gradle中添加以下提到的值。

android {
useLibrary 'org.apache.http.legacy'
.......
}