Błąd:
Gradle: Execution failed for task ':vertretungsplan:dexDebug'.
> Failed to run command:
P:\Android-Studio\sdk\build-tools\18.0.1\dx.bat --dex --output P:\Projekte\VertretungsplanProject\vertretungsplan\build\libs\vertretungsplan-debug.dex P:\Projekte\VertretungsplanProject\vertretungsplan\build\classes\debug P:\Projekte\VertretungsplanProject\vertretungsplan\build\dependency-cache\debug P:\Android-Studio\sdk\extras\android\m2repository\com\android\support\support-v4\18.0.0\support-v4-18.0.0.jar P:\Projekte\VertretungsplanProject\vertretungsplan\libs\commons-io-2.4.jar P:\Projekte\VertretungsplanProject\vertretungsplan\build\exploded-bundles\VertretungsplanProjectLibrariesActionbarsherlockUnspecified.aar\classes.jar
Error Code:
2
Output:
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing de/MayerhoferSimon/Vertretungsplan/LoginActivity$2.class
...while processing de/MayerhoferSimon/Vertretungsplan/LoginActivity$2.class
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing de/MayerhoferSimon/Vertretungsplan/MainActivity$1.class
...while processing de/MayerhoferSimon/Vertretungsplan/MainActivity$1.class
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing de/MayerhoferSimon/Vertretungsplan/YQL/YqlVplanParser.class
...while processing de/MayerhoferSimon/Vertretungsplan/YQL/YqlVplanParser.class
3 warnings
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dx.util.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:592)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:550)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:531)
at com.android.dx.merge.DexMerger.mergeDexBuffers(DexMerger.java:168)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:186)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:300)
at com.android.dx.command.dexer.Main.run(Main.java:232)
at com.android.dx.command.dexer.Main.main(Main.java:174)
at com.android.dx.command.Main.main(Main.java:91)
Struktura projektu:
build.gradle (actionbarsherlock)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:18.0.0'
}
android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 11
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
build.gradle (vertretungsplan)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/commons-io-2.4.jar')
compile project(':libraries:actionbarsherlock')
}
android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 11
}
}
settings.gradle
include ':vertretungsplan', ':libraries:actionbarsherlock'
Jak mogę naprawić ten błąd?