So i've been getting this unexpected top level exception error after adding the jasypt libraries to my project. I've tried a lot of the other fixes suggested in other similar questions to no avail
Here's my gradle build message:
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
and here's my 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')
}
I tried adding an exclusion in the build.gradle as per this question but I then get prompts to implement the getSupportFragmentManager() method in my class.
When I alt-enter again for the suggestion, it tells me to import fragment manager and then to return android.support.v4.app.FragmentManager in getSupportFragmentManager(). It also seems to mess up Context whenever i've used ".this"
Any help will be greatly appreciated. Thanks