'意想不到的顶级例外'多个dex文件在Android Studio中使用Jasypt定义...

时间:2015-05-08 08:55:24

标签: android android-studio jasypt

因此,在将jasypt库添加到我的项目后,我发现了这个意外的顶级异常错误。我已尝试过其他类似问题中提出的许多其他修复,但无济于事

这是我的gradle构建消息:

    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Multiple dex files define Lorg/jasypt/spring/properties/EncryptablePreferencesPlaceholderConfigurer;
    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
    at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
    at com.android.dx.command.dexer.Main.run(Main.java:246)
    at com.android.dx.command.dexer.Main.main(Main.java:215)
    at com.android.dx.command.Main.main(Main.java:106)
    Error:Execution failed for task ':app:dexDebug'.
    > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_40\bin\java.exe'' finished with non-zero exit value 2

这是我的build.gradle(app):

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.verve.eventfloc"
    minSdkVersion 16
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
    }
}
}



dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.0.0'


compile files('libs/jasypt-spring31-1.9.2.jar')
compile files('libs/jasypt-springsecurity2-1.9.2.jar')
compile files('libs/jasypt-1.9.2-sources.jar')
compile files('libs/jasypt-spring2-1.9.2-sources.jar')
compile files('libs/jasypt-1.9.2.jar')
compile files('libs/jasypt-hibernate3-1.9.2-javadoc.jar')
compile files('libs/jasypt-spring2-1.9.2.jar')
compile files('libs/jasypt-hibernate3-1.9.2.jar')
compile files('libs/jasypt-spring3-1.9.2-sources.jar')
compile files('libs/jasypt-springsecurity2-1.9.2-sources.jar')
compile files('libs/jasypt-hibernate4-1.9.2-sources.jar')
compile files('libs/jasypt-hibernate4-1.9.2.jar')
compile files('libs/jasypt-springsecurity2-1.9.2-javadoc.jar')
compile files('libs/jasypt-acegisecurity-1.9.2-javadoc.jar')
compile files('libs/jasypt-hibernate3-1.9.2-sources.jar')
compile files('libs/icu4j-3.4.4.jar')
compile files('libs/jasypt-1.9.2-javadoc.jar')
compile files('libs/jasypt-1.9.2-lite.jar')
compile files('libs/jasypt-spring31-1.9.2-javadoc.jar')
compile files('libs/jasypt-acegisecurity-1.9.2-sources.jar')
compile files('libs/jasypt-springsecurity3-1.9.2-javadoc.jar')
compile files('libs/jasypt-spring3-1.9.2-javadoc.jar')
compile files('libs/jasypt-spring31-1.9.2-sources.jar')
compile files('libs/jasypt-spring3-1.9.2.jar')
compile files('libs/jasypt-springsecurity3-1.9.2-sources.jar')
compile files('libs/jasypt-acegisecurity-1.9.2.jar')
compile files('libs/jasypt-springsecurity3-1.9.2.jar')
compile files('libs/jasypt-wicket13-1.9.2.jar')
compile files('libs/jasypt-spring2-1.9.2-javadoc.jar')
compile files('libs/jasypt-hibernate4-1.9.2-javadoc.jar')
compile files('libs/jasypt-wicket13-1.9.2-sources.jar')
compile files('libs/jasypt-wicket13-1.9.2-javadoc.jar')
compile files('libs/jasypt-wicket15-1.9.2.jar')
compile files('libs/jasypt-wicket15-1.9.2-javadoc.jar')
compile files('libs/jasypt-wicket15-1.9.2-sources.jar')
}

我尝试按照this问题在build.gradle中添加一个排除项,但我接到提示在我的类中实现getSupportFragmentManager()方法。

当我再次为建议alt-enter时,它告诉我导入片段管理器,然后在getSupportFragmentManager()中返回android.support.v4.app.FragmentManager。每当我使用"。这个"

时,它似乎也会陷入困境。

任何帮助将不胜感激。感谢

0 个答案:

没有答案