Hi there.
"theartofdev.edmodo:android-image-cropper:2.6.0" this is the version that i am using before android update to 3.1, and all was working fine.
Since the update i had a multidex problem.
(* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex.)
i managed to trace the problem back to the image cropper
com.android.support:appcompat-v7:27.0.2 gives me multiple errors if i have cropper set to2.6.0,
if i set to 2.6.+ , i cannot sync gradle and problem with appcompact persists.
if i comment out my cropper and comment out all related code in the project, my project builds fine and i can run program on device.
not to sure if i am explaining the problem correctly.
this is my Gradle file.
`android {
compileSdkVersion 27
defaultConfig {
applicationId "com.mymochi.magicmochi"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:3.2.1'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:3.2.1'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:3.2.1'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.android.gms:play-services-identity:11.8.0'
// FirebaseUI for Cloud Storage
implementation 'com.firebaseui:firebase-ui-storage:3.2.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
//Universal image loader
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
//Circle ImageView
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.7.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.github.ittianyu:BottomNavigationViewEx:1.2.4'
compile "com.android.support:design:27.0.2"
compile 'com.android.support:support-annotations:27.0.2'
}
apply plugin: 'com.google.gms.google-services'`
I also faced that error... Couldn't find a solution... read many possible workaround nothing worked.
the same problem
For me the easiest way to get it work was excluding the support libs from image-cropper, since I already include the libraries used by image cropper in my app:
implementation ('com.theartofdev.edmodo:android-image-cropper:2.6.0'){
exclude group: 'com.android.support', module: '*'
}
But only #496 will fix it completly
Please read my comment on another issue.
Forcing library version is the right solution here.
https://github.com/ArthurHub/Android-Image-Cropper/issues/495#issuecomment-369208974
use this one
'com.theartofdev.edmodo:android-image-cropper:2.5.+'
@Eltonio099 it works ,thanks
use older version 2.5.1
2.6.+ needs api lvl 27 and griddle v3
Updated v2.7.0 to use static version 27.1.1
Most helpful comment
For me the easiest way to get it work was excluding the support libs from image-cropper, since I already include the libraries used by image cropper in my app:
But only #496 will fix it completly