ayltai / Android-Lib-reCAPTCHA

[Deprecated] The reCAPTCHA Android Library provides a simple way to show a CAPTCHA as an ImageView in your Android app, helping you stop bots from abusing it. The library wraps the reCAPTCHA API.
Apache License 2.0
71 stars 27 forks source link

Issue with recaptcha-samples folder. #12

Closed siuyif closed 6 years ago

siuyif commented 6 years ago

Hi ayltai,

I am having issues building the codes that's provided in the recaptcha-samples folder with reference to Google's reCAPTCHA V2 API. I kept receiving this error message "Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/lib/recaptcha/ReCaptcha$1.class"

I would really appreciate your advise to this issue, thank you.

Here are my codes:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "26.0.2"
    defaultConfig {
        applicationId "android.lib.recaptcha.samples"
        minSdkVersion 14
        targetSdkVersion 25
        versionCode 1
        versionName "1.0.0"
        multiDexEnabled true

    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'android.lib.recaptcha:reCAPTCHA:2.0.0'

}