ArthurHub / Android-Image-Cropper

Image Cropping Library for Android, optimized for Camera / Gallery.
Apache License 2.0
6.4k stars 1.38k forks source link

Unable to parse dex. #495

Closed majeytunio closed 6 years ago

majeytunio commented 6 years ago

I was away from my city for 3 days as I came back I opened my project which is about Job Portal. It was working fine last time when I was going out. But now as I opened it and run it says )Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex)

My whole stacktrace is below:

--- STACK TRACE ---

Executing tasks: [clean, :app:assembleDebug]

Configuration on demand is an incubating feature. :clean :app:clean :app:preBuild UP-TO-DATE :app:preDebugBuild :app:compileDebugAidl :app:compileDebugRenderscript :app:checkDebugManifest :app:generateDebugBuildConfig :app:prepareLintJar UP-TO-DATE :app:generateDebugResValues :app:generateDebugResources :app:mergeDebugResources :app:createDebugCompatibleScreenManifests :app:processDebugManifest :app:splitsDiscoveryTaskDebug :app:processDebugResources :app:generateDebugSources :app:javaPreCompileDebug :app:compileDebugJavaWithJavac :app:compileDebugNdk NO-SOURCE :app:compileDebugSources :app:mergeDebugShaders :app:compileDebugShaders :app:generateDebugAssets :app:mergeDebugAssets :app:transformClassesWithDexBuilderForDebug :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED

FAILURE: Build failed with an exception.

BUILD FAILED in 38s

21 actionable tasks: 20 executed, 1 up-to-date

androideveloper commented 6 years ago

This is due to the fact that this library includes support libraries with 27.+ version. Support library 27.1.0 was released yesterday and is automatically included in your project with another version defined by yourself. The lib must not define dynamic version! Meanwhile you should force all of your support libraries to use the same version:

configurations.all {
    resolutionStrategy {
        eachDependency { details ->
            // Force all of the primary support libraries to use the same version.
            if (details.requested.group == 'com.android.support'
                    && details.requested.name != 'multidex'
                    && details.requested.name != 'multidex-instrumentation') {
                details.useVersion supportLibraryVersion
            }
        }
    }
}

Code taken from https://github.com/JakeWharton/u2020/blob/master/build.gradle

majeytunio commented 6 years ago

Thank you so much dear @androideveloper it really worked for me. 👍 I was ready to give up and thinking to start a new project but this helped a lot. I just changed all my libraries which were 26.1.0 to 27.1.0 and it saved my time. Thank you once again 🥇

androideveloper commented 6 years ago

You are welcome :) That is good for the project in general, but I also recommend you to add my mentioned code to escape such issues next time ;)

ghost commented 6 years ago

please help i have still unable to marge error

apply plugin: 'com.android.application'

android { buildToolsVersion "27.0.3" compileSdkVersion 27 defaultConfig { applicationId "app.iraklisamniashvilii.com.geoforum" minSdkVersion 21 targetSdkVersion 27 versionCode 3 versionName "3.1" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true multiDexEnabled = true }

dataBinding {
    enabled true
}
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.1.0' implementation 'com.android.support:cardview-v7:27.1.0' implementation 'com.android.support:recyclerview-v7:27.1.0'

implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.1.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
compile 'com.firebaseui:firebase-ui-database:2.3.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
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'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.10'
compile 'com.android.support:multidex:1.0.1'
compile 'id.zelory:compressor:2.0.0'
compile 'com.wang.avi:library:2.1.3'
compile 'com.github.jd-alexander:LikeButton:0.2.3'
compile "me.leolin:ShortcutBadger:1.1.21@aar"
implementation 'com.mikepenz:actionitembadge:3.3.2@aar'
implementation 'com.mikepenz:fontawesome-typeface:5.0.6.0@aar'
implementation "com.mikepenz:iconics-core:3.0.3@aar"
compile "me.leolin:ShortcutBadger:1.1.21@aar"

}

apply plugin: 'com.google.gms.google-services'

majeytunio commented 6 years ago

Dear @ODINA101 please change your Image-Cropper dependency from compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+' to implementation 'com.theartofdev.edmodo:android-image-cropper:2.5.+' and I suggest you to change all compile to implementation.

AbhishekJakkannavar commented 6 years ago

@majeytunio @androideveloper i have updated libraries which were 26.1.0 to 27.1.0 but still my problem is not solved please help here is my gradle file and this is the error

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

`apply plugin: 'com.android.application'

android { compileSdkVersion 27 defaultConfig { applicationId "infinityinc.com.invento2k17" minSdkVersion 16 targetSdkVersion 25

    versionCode 6
    versionName "1.5"
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    manifestPlaceholders = [manifestApplicationId: "${applicationId}",
                            pushbots_app_id      : "58f9d3174a9efa09808b4567",
                            pushbots_loglevel    : "DEBUG",
                            google_sender_id     : "672589208032"]

}

sourceSets {
    main {
        res.srcDirs =
                [
                        'src/main/res/layouts/layouts_category2',
                        'src/main/res/layouts',
                        'src/main/res'
                ]
    }
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

    useLibrary 'org.apache.http.legacy'
}

packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE-FIREBASE.txt'
    exclude 'META-INF/NOTICE'

}

}

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha6' compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.6' compile 'com.android.support:cardview-v7:27.0.1' compile 'com.google.firebase:firebase-messaging:11.0.4' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.android.support:recyclerview-v7:27.0.1' compile 'com.github.aakira:expandable-layout:1.4.2@aar' compile 'com.squareup.okhttp:okhttp:2.4.0' compile 'com.android.support:support-v4:27.0.1' compile 'de.hdodenhof:circleimageview:2.0.0'

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.0.0-beta1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.0.0'

    compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'

compile 'com.github.aakira:expandable-layout:1.4.2@aar'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.android.support:support-v4:27.0.1'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.firebaseui:firebase-ui:0.4.4'

implementation 'com.android.support:recyclerview-v7:27.0.1'
implementation 'com.android.support:cardview-v7:27.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.0.0-beta1'
implementation 'com.google.firebase:firebase-database:11.0.4'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.firebase:firebase-storage:11.0.4'
implementation 'com.google.firebase:firebase-auth:11.0.4'
implementation 'com.firebaseui:firebase-ui-database:2.3.0'
implementation 'com.google.android.gms:play-services-auth:11.0.4'
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'

implementation files('libs/universal-image-loader-1.8.4-with-sources.jar')

implementation 'com.pushbots:pushbots-lib:3.0.1@aar'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
implementation 'com.commit451:PhotoView:1.2.4'

testCompile 'junit:junit:4.12'
implementation files('libs/CircleImageView-master/gradle/wrapper/gradle-wrapper.jar')

testCompile 'junit:junit:4.12'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.squareup.okhttp3:okhttp:3.3.1'
implementation 'com.google.code.gson:gson:2.6.2'
implementation 'com.squareup.retrofit2:retrofit:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.1.0'

implementation 'com.googlecode.json-simple:json-simple:1.1'

implementation 'org.apache.commons:commons-io:1.3.2'

}

configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == 'com.android.support') { if (!requested.name.startsWith("multidex")) { details.useVersion '27.0.1' } } } }

android { defaultConfig { multiDexEnabled true } }

apply plugin: 'com.google.gms.google-services' `

majeytunio commented 6 years ago

Dear @AbhishekJakkannavar please use Firebase 11.8.0 and replace compile with implementation everywhere. I suggest you minSdkVersion 20 and targetSdkVersion 27. If this will not work for you than please share your Stack-trace information.

eliezerbasubi commented 6 years ago

Sorry Sir, i'm going through the whole steps , i changed even my sdk version but i'm still getting the same error when i rebuild the project. Is there a good way i can fix this issue. Help please

majeytunio commented 6 years ago

Dear @eliezerbasubi can you please show your stacktrace we cannot find any solution until you don't provide full information about your error. Please share you stacktrace here so we can find the better solution for you.

eliezerbasubi commented 6 years ago

Thanks Sir, i used the following solution and it works pretty good now

solution

configurations.all { resolutionStrategy { eachDependency { details -> // Force all of the primary support libraries to use the same version. if (details.requested.group == 'com.android.support' && details.requested.name != 'multidex' && details.requested.name != 'multidex-instrumentation') { details.useVersion supportLibraryVersion } } } }

On Tue, Mar 6, 2018 at 5:17 PM, Majey Tunio notifications@github.com wrote:

Dear @eliezerbasubi https://github.com/eliezerbasubi can you please show your stacktrace we cannot find any solution until you don't provide full information about your error. Please share you stacktrace here so we can find the better solution for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ArthurHub/Android-Image-Cropper/issues/495#issuecomment-370795118, or mute the thread https://github.com/notifications/unsubscribe-auth/AXrFcMeDKMP4YkUH-8dWEWoh3RIY4V0rks5tbpqOgaJpZM4SWZv_ .

TahaAli07 commented 6 years ago

[ UNABLE TO MERGE DEX SOLVED ] After hours of stack overflowing I resolved the " UNABLE TO MERGE DEX ERROR "

  1. Update all the com.android.support lines in your gradle to v27.1.0

Cause - Android has updated it support libraries to v27.1.0 , so you have to change all the android support lines in your gradle file to 27.1.0 from 26.1.0

  1. Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example: allprojects { repositories { jcenter() maven { url "https://maven.google.com" } } }

Cause :- Android cannot update the support libraries in the SDK manager and now it uses maven.google.com to update , so you have to include this to use 27.1.0 support libraries

yinka1255 commented 6 years ago

Pls which file will I add his code. which location. Am lost configurations.all { resolutionStrategy { eachDependency { details -> // Force all of the primary support libraries to use the same version. if (details.requested.group == 'com.android.support' && details.requested.name != 'multidex' && details.requested.name != 'multidex-instrumentation') { details.useVersion supportLibraryVersion } } } }

noahalorwu commented 6 years ago

Go to build.gradle (Project: AppName) @yinka1255

yinka1255 commented 6 years ago

I added the code here '\platforms\android\app\build.gradle

/THIS IS MY BUILD.GRADLE/

/*
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.

*/

apply plugin: 'com.android.application'

configurations.all { resolutionStrategy { eachDependency { details -> // Force all of the primary support libraries to use the same version. if (details.requested.group == 'com.android.support' && details.requested.name != 'multidex' && details.requested.name != 'multidex-instrumentation') { details.useVersion supportLibraryVersion } } } }

buildscript { repositories { mavenCentral() jcenter() maven { url "https://maven.google.com" } }

dependencies {
    classpath 'com.android.tools.build:gradle:3.0.0'
}

}

// Allow plugins to declare Maven dependencies via build-extras.gradle. allprojects { repositories { mavenCentral(); jcenter() } }

task wrapper(type: Wrapper) { gradleVersion = '4.1.0' }

// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties. // Refer to: http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html ext { apply from: '../CordovaLib/cordova.gradle' // The value for android.compileSdkVersion. if (!project.hasProperty('cdvCompileSdkVersion')) { cdvCompileSdkVersion = null; } // The value for android.buildToolsVersion. if (!project.hasProperty('cdvBuildToolsVersion')) { cdvBuildToolsVersion = null; } // Sets the versionCode to the given value. if (!project.hasProperty('cdvVersionCode')) { cdvVersionCode = null } // Sets the minSdkVersion to the given value. if (!project.hasProperty('cdvMinSdkVersion')) { cdvMinSdkVersion = null } // Whether to build architecture-specific APKs. if (!project.hasProperty('cdvBuildMultipleApks')) { cdvBuildMultipleApks = null } // Whether to append a 0 "abi digit" to versionCode when only a single APK is build if (!project.hasProperty('cdvVersionCodeForceAbiDigit')) { cdvVersionCodeForceAbiDigit = null } // .properties files to use for release signing. if (!project.hasProperty('cdvReleaseSigningPropertiesFile')) { cdvReleaseSigningPropertiesFile = null } // .properties files to use for debug signing. if (!project.hasProperty('cdvDebugSigningPropertiesFile')) { cdvDebugSigningPropertiesFile = null } // Set by build.js script. if (!project.hasProperty('cdvBuildArch')) { cdvBuildArch = null }

// Plugin gradle extensions can append to this to have code run at the end.
cdvPluginPostBuildExtras = []

}

// PLUGIN GRADLE EXTENSIONS START // PLUGIN GRADLE EXTENSIONS END

def hasBuildExtras = file('build-extras.gradle').exists() if (hasBuildExtras) { apply from: 'build-extras.gradle' }

// Set property defaults after extension .gradle files. if (ext.cdvCompileSdkVersion == null) { ext.cdvCompileSdkVersion = privateHelpers.getProjectTarget() //ext.cdvCompileSdkVersion = project.ext.defaultCompileSdkVersion } if (ext.cdvBuildToolsVersion == null) { ext.cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools() //ext.cdvBuildToolsVersion = project.ext.defaultBuildToolsVersion } if (ext.cdvDebugSigningPropertiesFile == null && file('../debug-signing.properties').exists()) { ext.cdvDebugSigningPropertiesFile = '../debug-signing.properties' } if (ext.cdvReleaseSigningPropertiesFile == null && file('../release-signing.properties').exists()) { ext.cdvReleaseSigningPropertiesFile = '../release-signing.properties' }

// Cast to appropriate types. ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean(); ext.cdvVersionCodeForceAbiDigit = cdvVersionCodeForceAbiDigit == null ? false : cdvVersionCodeForceAbiDigit.toBoolean(); ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? null : defaultMinSdkVersion ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode)

def computeBuildTargetName(debugBuild) { def ret = 'assemble' if (cdvBuildMultipleApks && cdvBuildArch) { def arch = cdvBuildArch == 'arm' ? 'armv7' : cdvBuildArch ret += '' + arch.toUpperCase().charAt(0) + arch.substring(1); } return ret + (debugBuild ? 'Debug' : 'Release') }

// Make cdvBuild a task that depends on the debug/arch-sepecific task. task cdvBuildDebug cdvBuildDebug.dependsOn { return computeBuildTargetName(true) }

task cdvBuildRelease cdvBuildRelease.dependsOn { return computeBuildTargetName(false) }

task cdvPrintProps << { println('cdvCompileSdkVersion=' + cdvCompileSdkVersion) println('cdvBuildToolsVersion=' + cdvBuildToolsVersion) println('cdvVersionCode=' + cdvVersionCode) println('cdvVersionCodeForceAbiDigit=' + cdvVersionCodeForceAbiDigit) println('cdvMinSdkVersion=' + cdvMinSdkVersion) println('cdvBuildMultipleApks=' + cdvBuildMultipleApks) println('cdvReleaseSigningPropertiesFile=' + cdvReleaseSigningPropertiesFile) println('cdvDebugSigningPropertiesFile=' + cdvDebugSigningPropertiesFile) println('cdvBuildArch=' + cdvBuildArch) println('computedVersionCode=' + android.defaultConfig.versionCode) android.productFlavors.each { flavor -> println('computed' + flavor.name.capitalize() + 'VersionCode=' + flavor.versionCode) } }

android {

defaultConfig {
    versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
    applicationId privateHelpers.extractStringFromManifest("package")

    if (cdvMinSdkVersion != null) {
        minSdkVersion cdvMinSdkVersion
    }
}

lintOptions {
  abortOnError false;
}

compileSdkVersion cdvCompileSdkVersion
buildToolsVersion cdvBuildToolsVersion

//This code exists for Crosswalk and other Native APIs.
//By default, we multiply the existing version code in the Android Manifest by 10 and 
//add a number for each architecture.  If you are not using Crosswalk or SQLite, you can
//ignore this chunk of code, and your version codes will be respected.

if (Boolean.valueOf(cdvBuildMultipleApks)) {
    flavorDimensions "default"

    productFlavors {
        armeabi {
            versionCode defaultConfig.versionCode*10 + 1
            ndk {
                abiFilters = ["armeabi"]
            }
        }
        armv7 {
            versionCode defaultConfig.versionCode*10 + 2
            ndk {
                abiFilters = ["armeabi-v7a"]
            }
        }
        arm64 {
            versionCode defaultConfig.versionCode*10 + 3
            ndk {
                abiFilters = ["arm64-v8a"]
            }
        }
        x86 {
            versionCode defaultConfig.versionCode*10 + 4
            ndk {
                abiFilters = ["x86"]
            }
        }
        x86_64 {
            versionCode defaultConfig.versionCode*10 + 5
            ndk {
                abiFilters = ["x86_64"]
            }
        }
    }
} else if (Boolean.valueOf(cdvVersionCodeForceAbiDigit)) {
    // This provides compatibility to the default logic for versionCode before cordova-android 5.2.0
    defaultConfig {
        versionCode defaultConfig.versionCode*10
    }
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

if (cdvReleaseSigningPropertiesFile) {
    signingConfigs {
        release {
            // These must be set or Gradle will complain (even if they are overridden).
            keyAlias = ""
            keyPassword = "__unset" // And these must be set to non-empty in order to have the signing step added to the task graph.
            storeFile = null
            storePassword = "__unset"
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }
    addSigningProps(cdvReleaseSigningPropertiesFile, signingConfigs.release)
}
if (cdvDebugSigningPropertiesFile) {
    addSigningProps(cdvDebugSigningPropertiesFile, signingConfigs.debug)
}

}

/*

dependencies { implementation fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DEPENDENCIES START implementation(project(path: ":CordovaLib")) compile "com.android.support:support-v4:24.1.1+" compile "com.android.support:support-v4:25.+" compile "com.android.support:appcompat-v7:25.+" // SUB-PROJECT DEPENDENCIES END }

def promptForReleaseKeyPassword() { if (!cdvReleaseSigningPropertiesFile) { return; } if ('unset'.equals(android.signingConfigs.release.storePassword)) { android.signingConfigs.release.storePassword = privateHelpers.promptForPassword('Enter key store password: ') } if ('unset'.equals(android.signingConfigs.release.keyPassword)) { android.signingConfigs.release.keyPassword = privateHelpers.promptForPassword('Enter key password: '); } }

gradle.taskGraph.whenReady { taskGraph -> taskGraph.getAllTasks().each() { task -> if(['validateReleaseSigning', 'validateSigningRelease', 'validateSigningArmv7Release', 'validateSigningX76Release'].contains(task.name)) { promptForReleaseKeyPassword() } } }

def addSigningProps(propsFilePath, signingConfig) { def propsFile = file(propsFilePath) def props = new Properties() propsFile.withReader { reader -> props.load(reader) }

def storeFile = new File(props.get('key.store') ?: privateHelpers.ensureValueExists(propsFilePath, props, 'storeFile'))
if (!storeFile.isAbsolute()) {
    storeFile = RelativePath.parse(true, storeFile.toString()).getFile(propsFile.getParentFile())
}
if (!storeFile.exists()) {
    throw new FileNotFoundException('Keystore file does not exist: ' + storeFile.getAbsolutePath())
}
signingConfig.keyAlias = props.get('key.alias') ?: privateHelpers.ensureValueExists(propsFilePath, props, 'keyAlias')
signingConfig.keyPassword = props.get('keyPassword', props.get('key.alias.password', signingConfig.keyPassword))
signingConfig.storeFile = storeFile
signingConfig.storePassword = props.get('storePassword', props.get('key.store.password', signingConfig.storePassword))
def storeType = props.get('storeType', props.get('key.store.type', ''))
if (!storeType) {
    def filename = storeFile.getName().toLowerCase();
    if (filename.endsWith('.p12') || filename.endsWith('.pfx')) {
        storeType = 'pkcs12'
    } else {
        storeType = signingConfig.storeType // "jks"
    }
}
signingConfig.storeType = storeType

}

for (def func : cdvPluginPostBuildExtras) { func() }

// This can be defined within build-extras.gradle as: // ext.postBuildExtras = { ... code here ... } if (hasProperty('postBuildExtras')) { postBuildExtras() }

/*AND I GOT THIS ERROR WHEN I TRY TO BUILD

14 actionable tasks: 1 executed, 13 up-to-date

(node:8752) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec tion id: 1): Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

BUILD FAILED in 3s

yinka1255 commented 6 years ago

When i try to change to compile "com.android.support:support-v7:27.1.0" compile "com.android.support:appcompat-v7:27.1.0"

THIS IS WHAT I GOT

14 actionable tasks: 1 executed, 13 up-to-date

(node:8456) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec tion id: 1): Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

BUILD FAILED in 16s

AtulSalgaonkar commented 6 years ago

use older version i.e. 2.5.+

eliezerbasubi commented 6 years ago

Hey, thanks everyone for your answers. It works now perfectly

On Mon, Mar 19, 2018 at 7:54 AM, Atul Salgaonkar notifications@github.com wrote:

use older version i.e. 2.5.+

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ArthurHub/Android-Image-Cropper/issues/495#issuecomment-374101120, or mute the thread https://github.com/notifications/unsubscribe-auth/AXrFcOqo7sylg3D7wlLkAqgHTqDdqrXnks5tfzoDgaJpZM4SWZv_ .

rockeypandit commented 6 years ago

apply plugin: 'com.android.application'

android { compileSdkVersion 27 defaultConfig { applicationId "com.example.rockeypandit.ipl2018" minSdkVersion 21 targetSdkVersion 27 versionCode 1 versionName "1.0" multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }

packagingOptions {
    exclude 'META-INF/README.md'
    exclude 'META-INF/CHANGES'

}

}

dependencies { implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support:design:27.1.0' 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' implementation 'com.android.support:cardview-v7:27.1.0' implementation 'com.android.support:recyclerview-v7:27.1.0' implementation 'com.github.bumptech.glide:glide:3.7.0' compile 'org.jsoup:jsoup:1.11.2' compile 'com.google.code.gson:gson:2.8.2' implementation files('libs/cricbuzz.jar') compile 'com.android.support:multidex:1.0.3' }

Error : Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

please help the problem is not solving.

ArthurHub commented 6 years ago

Updated v2.7.0 to use static version 27.1.1

paramesh401 commented 6 years ago

Hi, this is what I'm getting. Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

i have updated all versions, but still not resolved my problem. please guide me to solve this. Thanks in advance

eliezerbasubi commented 6 years ago

did you do as i did in my answer ????

On Tue, Apr 17, 2018 at 9:55 AM, paramesh401 notifications@github.com wrote:

Hi, this is what I'm getting. Error:Execution failed for task ':app:transformDexArchiveWithExterna lLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

i have updated all versions, but still not resolved my problem. please guide me to solve this. Thanks in advance

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ArthurHub/Android-Image-Cropper/issues/495#issuecomment-381869194, or mute the thread https://github.com/notifications/unsubscribe-auth/AXrFcD7wudaoBACaoLPJIwD2fZG8eGkpks5tpZHPgaJpZM4SWZv_ .

Atta-Ur-Rahman commented 6 years ago

change the minSdkVersion

JAGANPS commented 4 years ago

FAILURE: Build failed with an exception.

BUILD FAILED in 2s [!] The shrinker may have failed to optimize the Java bytecode. To disable the shrinker, pass the --no-shrink flag to this command. To learn more, see: https://developer.android.com/studio/build/shrink-code Gradle task assembleDebug failed with exit code 1 Exited (sigterm)