Ich habe ein Problem, wenn ich meine app kompilieren wollen:Unexpected Top-Level-Exception in android-support-v4.jar
UNERWARTETE TOP-LEVEL AUSNAHME: java.lang.IllegalArgumentException: bereits added`
Es scheint ein Fehler mit android-support-v4.jar zu sein.
In meinem Projekt habe ich 3 Bibliotheken: appcompat, facebook, google_play_services.
Meine gradle Dateien:
AppProject/settings.gradle
include ':libraries:google_play_services', ':libraries:appcompat', ':libraries:facebook', ':app'
AppProject/build.gradle:
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.+' } }
AppProject/app/build.gradle:
apply plugin: 'android' dependencies { compile project(':libraries:appcompat') compile project(':libraries:facebook') compile project(':libraries:google_play_services') compile files('libs/android-async-http-1.4.3.jar') compile files('libs/gson-2.2.4.jar') compile files('libs/libGoogleAnalyticsV2.jar') compile files('libs/universal-image-loader-1.8.4.jar') compile files('libs/urbanairship-lib-3.0.0.jar') }
AppProject/Bibliotheken/appcompat/build.gradle:
apply plugin: 'android-library' dependencies { compile files('libs/android-support-v4.jar') compile files('libs/android-support-v7-appcompat.jar') }
AppProject/Bibliotheken/facebook/buidle.gradle:
apply plugin: 'android-library' dependencies { compile files('libs/android-support-v4.jar') }
AppProject/Bibliotheken/google_play_services/buidle.gradle :
apply plugin: 'android-library' dependencies { compile files('libs/google-play-services.jar') }
Aber wenn ich es kompilieren, diese Fehlermeldung angezeigt:
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/NotificationCompatIceCreamSandwich;
Können Sie mir helfen?
Hallo, können Sie näher erläutern, was das Problem war? Und wie hast du dieses Problem gelöst? – yasith