Program type already present: com.google.zxing.ChecksumException

I try using zxing library to scan a qrcode, there's no error until I run the app like this:

Program type already present: com.google.zxing.ChecksumException

Message{kind=ERROR, text=Program type already present: com.google.zxing.ChecksumException, sources=[Unknown source file], tool name=Optional.of(D8)}

here's my gradle:

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.std.scanner"
        minSdkVersion 18
        targetSdkVersion 26
        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(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
}

i think i should using "exclude" in my gradle dependecies, but I don't know how to write the code. please help, thanks in advance.

I was getting the same error except it was the com.google.zxing.BarcodeFormat. Turned out i had the BarcodeFormat in the app from a .jar library i had in /libs.

Have you tried searching for ChecksumException class in you app by pressing Ctrl + N and typing "ChecksumException" ?

Program type already present: com.google.zxing.client.android , khaliqdadmohmand commented on May 24, 2019. press Ctrl+N and search for ChecksumException to see which classes are same.. Program type already present: com.google.zxing.BarcodeFormat. Copy link Quote reply Mitnick21 commented Jan 17, 2020. En mi caso descubrimos junto a un amigo que el

solve by add in build.gradle (app)

configurations {
    implementation.exclude group: 'com.google.zxing'
}

How to solve Program type already present: com.google.zxing , I am using ionic 4. When my project have facebook plugin and BarcodeScanner plugin and type ionic cordova run android, it will come out this� Program type already present: com.google.zxing.client.android.camera.open.OpenCameraInterface Which library version are you using? 3.6.0. Which phone/tablet are you using, and which Android version does it run? (e.g. Samsung Galaxy S5, Android 5.0) - Galaxy S6. Does the same happen on other devices or an emulator? Yes. Any help will be

My mistake was i added a plugin (qrcode) in pubspec.yml which overwrite another class defined from another plugin (animated_qr_code_scanner), and then exist a conflict between plugins (and classes). You can try comenting the last added plugin to locate the used classes.

Fix Error Program type already present com google zxing , Fix Error Program type already present com google zxing BarcodeFormat. 255 views255 views Duration: 4:00 Posted: Jan 24, 2020 When using the Gradle option to make an AAR out of zxing-android-embedded an exception pops that says: FAILURE: Build failed with an exception. What went wrong: Could not resolve all files for configuration ':zxing-android-embedded:lintC

Error: Program type already present: com.google.zxing , Error: Program type already present: com.google.zxing.BarcodeFormat. Caused by: java.lang.RuntimeException: com.android� Im getting this exceptions com.google.zxing.FormatException and com.google.zxing.ChecksumException First I thought I was doing something wrong, so I try using XZING QrReader and worked instantly, so I create another Qr using an online QR generator, same problem and XZING read it just like before.

Tipo de programa ya presente: com.google.zxing.ChecksumException, ChecksumException Message{kind=ERROR, text=Program type already present: com.google.zxing.ChecksumException, sources=[Unknown source file], tool� Java code examples for com.google.zxing.common.BitMatrix. Learn how to use java api com.google.zxing.common.BitMatrix

D8: Program type already present - ionic-v3, DexArchiveMergerException: Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio/build/� The message Error:Program type already present helped me understanding that I had to rename the package name of the Android Studio project which was building the library because the two shared the same package name. So I renamed it, I built again the aar file and I added again this “new” file to the Android Studio project building the apk

Comments
  • ZXing Readme says only SDK 19+ is supported. You have set it to 18.
  • @SaurabhThorat I have tried change to minSdkVersion 19 but it doesn't work..
  • Try changing support library version to 27.1.1
  • @SaurabhThorat doesn't work, still error :(
  • Try setting it to 25.3.1. ZXing have done that in their sample
  • You saved my lunch.
  • In short: implement library in gradle rather than using JAR file.
  • It works but now just change it to- configurations { implementation.exclude group: 'com.google.zxing' }
  • This can be added anywhere in the build.gradle file for the application, correct?