Ho un problema quando voglio compilare il mio app:imprevisto di primo livello delle eccezioni in Android-support-v4.jar
IMPREVISTO ECCEZIONE TOP-LEVEL: java.lang.IllegalArgumentException: già added`
Sembra un errore con android-support-v4.jar.
Nel mio progetto ho 3 librerie: appcompat, facebook, google_play_services.
miei file Gradle:
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/librerie/appcompat/build.gradle:
apply plugin: 'android-library' dependencies { compile files('libs/android-support-v4.jar') compile files('libs/android-support-v7-appcompat.jar') }
AppProject/librerie/facebook/buidle.gradle:
apply plugin: 'android-library' dependencies { compile files('libs/android-support-v4.jar') }
AppProject/librerie/google_play_services/buidle.gradle :
apply plugin: 'android-library' dependencies { compile files('libs/google-play-services.jar') }
Ma quando compilo esso, appare questo errore:
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/NotificationCompatIceCreamSandwich;
Mi potete aiutare?
Ciao, puoi approfondire quale fosse il problema? E come hai risolto questo problema? – yasith