Closed MrFuFuFu closed 9 years ago
Does your project already depend on nineoldandroids? If it does, try excluding it:
compile('com.facebook.fresco:fresco:0.4.0') {
exclude group: 'com.nineoldandroids', module: 'library'
}
I'm using fresco and nineoldandroid normally without exclude it.
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.facebook.fresco:fresco:0.4.0'
Android Studio 1.1.0
@tyronen I used to write your way, but still the same error occurs, I have clean and build. this is my build.gradle:
apply plugin: 'com.android.application'
android {
signingConfigs {
release {
keyAlias 'nvshen.keystore'
keyPassword 'nvshen'
storeFile file('/Users/MrFu/Desktop/Goddess/AS/wakeup/nvshen.keystore')
storePassword 'nvshen'
}
}
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.leixun.nvshen"
minSdkVersion 14
targetSdkVersion 22
versionCode 96
versionName "2.4.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
}
android {
lintOptions {
abortOnError false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//// compile 'com.android.support:appcompat-v7:22.1.0'
compile('com.facebook.fresco:fresco:0.4.0') {
exclude group: 'com.nineoldandroids', module: 'library'
}
compile 'com.nineoldandroids:library:2.4.0'
compile files('libs/alipaysdk.jar')
compile files('libs/alipaysecsdk.jar')
compile files('libs/alipayutdid.jar')
compile files('libs/android-support-v4.jar')
compile files('libs/aspectjrt-1.7.3.jar')
compile files('libs/dianle_custom.jar')
compile files('libs/domob_android_offer_wall_sdk.jar')
compile files('libs/GetuiExt-1.2.2.jar')
compile files('libs/GetuiSdk-2.2.5.2.jar')
compile files('libs/gson-2.2.2.jar')
compile files('libs/isoparser-1.0.2.jar')
compile files('libs/libammsdk.jar')
compile files('libs/locSDK_4.1.jar')
compile files('libs/MiPush_SDK_Client_2_2_12_sdk.jar')
compile files('libs/mta-sdk-1.6.2.jar')
// compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/open_sdk_r4547.jar')
compile files('libs/picasso-2.4.0.jar')
compile files('libs/procmo.jar')
compile files('libs/umeng-analytics-v5.2.3.jar')
compile files('libs/weibosdkcore.jar')
}
Is there a library-2.4.0.jar file inside your libs directory? If so, delete it.
@tyronen I have deleted the nineoldandroids-2.4.0.jar files. But the problem still exists. There may be my Java JDK problem? Or is the problem of Android studio.
Had this issue too, burnaz's gradle worked for me after i removed nine old androids from my actual project.
@tyronen @burnaz @stevensanborn I have build succeeded, using the following dependencies, thank you very much.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//// compile 'com.android.support:appcompat-v7:22.1.0'
compile('com.facebook.fresco:fresco:0.4.0') {
exclude group: 'com.nineoldandroids', module: 'library'
exclude group: 'com.squareup.picasso', module: 'picasso'
}
compile 'com.android.support:support-v4:22.1.0'
compile files('libs/alipaysdk.jar')
compile files('libs/alipaysecsdk.jar')
compile files('libs/alipayutdid.jar')
compile files('libs/aspectjrt-1.7.3.jar')
compile files('libs/dianle_custom.jar')
compile files('libs/domob_android_offer_wall_sdk.jar')
compile files('libs/GetuiExt-1.2.2.jar')
compile files('libs/GetuiSdk-2.2.5.2.jar')
compile files('libs/isoparser-1.0.2.jar')
compile files('libs/libammsdk.jar')
compile files('libs/locSDK_4.1.jar')
compile files('libs/MiPush_SDK_Client_2_2_12_sdk.jar')
compile files('libs/mta-sdk-1.6.2.jar')
compile files('libs/open_sdk_r4547.jar')
compile files('libs/procmo.jar')
compile files('libs/umeng-analytics-v5.2.3.jar')
compile files('libs/weibosdkcore.jar')
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.code.gson:gson:2.3.1'
}
I encountered this problem How can I do it. I just added my project compile 'com.facebook.fresco: fresco: 0.4.0+' dependence , if not add, do not have this problem.
Version of Android Studio (available in the about box): 1.2 RC2 OS version: Mac OS 10.10.3 Java JRE/JDK version: 1.7.0_45
:app:dexDebug UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lcom/nineoldandroids/animation/Animator$AnimatorListener; 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)
:app:dexDebug FAILED
FAILURE: Build failed with an exception.