Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':app:checkDebugDuplicateClasses' #69

Open
Djip opened this issue Jul 16, 2019 · 3 comments
Open

Execution failed for task ':app:checkDebugDuplicateClasses' #69

Djip opened this issue Jul 16, 2019 · 3 comments

Comments

@Djip
Copy link

Djip commented Jul 16, 2019

Hello
After getting the first bug resolved in #67 then a new appeared.

Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class com.google.android.gms.common.api.internal.zza found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.api.internal.zzb found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.api.internal.zzc found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.api.internal.zzd found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.api.zza found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.api.zzb found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.internal.zzb found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.internal.zzq found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.internal.zzr found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)
  Duplicate class com.google.android.gms.common.internal.zzs found in modules classes.jar (com.google.android.gms:play-services-base:11.4.0) and classes.jar (com.google.android.gms:play-services-basement:16.0.1)

I'm not having any special plugins installed, but here's what my package.json file looks like

"dependencies": {
        "@progress-nativechat/nativescript-nativechat": "^2.0.4",
        "@teammaestro/nativescript-svg": "^1.0.1",
        "@vue/devtools": "^5.1.1",
        "kinvey-nativescript-sdk": "^4.2.2",
        "nativescript-accelerometer": "^2.0.1",
        "nativescript-admob": "^3.3.3",
        "nativescript-background-http": "^3.4.1",
        "nativescript-camera": "^4.5.0",
        "nativescript-geolocation": "^5.1.0",
        "nativescript-image": "^2.1.4",
        "nativescript-imagepicker": "^6.2.0",
        "nativescript-intl": "^3.0.0",
        "nativescript-iqkeyboardmanager": "^1.5.1",
        "nativescript-social-share": "^1.5.2",
        "nativescript-socketio": "^3.3.1",
        "nativescript-svg": "^1.3.7",
        "nativescript-theme-core": "^1.0.6",
        "nativescript-toasty": "^2.0.0",
        "nativescript-ui-autocomplete": "^4.1.1",
        "nativescript-ui-calendar": "^4.1.0",
        "nativescript-ui-chart": "^4.0.2",
        "nativescript-ui-dataform": "^4.0.1",
        "nativescript-ui-gauge": "^4.0.0",
        "nativescript-ui-listview": "^6.4.2",
        "nativescript-ui-sidedrawer": "^6.0.0",
        "nativescript-vue": "^2.3.0",
        "nativescript-vue-devtools": "^1.2.0",
        "tns-core-modules": "^5.4.3",
        "vuex": "^3.1.1"
    },
    "devDependencies": {
        "@babel/core": "^7.4.5",
        "@babel/preset-env": "^7.0.0",
        "babel-loader": "^8.0.2",
        "babel-traverse": "6.26.0",
        "babel-types": "6.26.0",
        "babylon": "6.18.0",
        "clean-webpack-plugin": "^0.1.19",
        "copy-webpack-plugin": "^4.5.2",
        "css-hot-loader": "^1.4.2",
        "css-loader": "^1.0.0",
        "lazy": "1.0.11",
        "mini-css-extract-plugin": "^0.4.1",
        "nativescript-dev-webpack": "^0.24.1",
        "nativescript-vue-template-compiler": "^2.0.0-alpha.3",
        "nativescript-worker-loader": "~0.9.0",
        "node-sass": "^4.9.2",
        "sass-loader": "^7.1.0",
        "uglifyjs-webpack-plugin": "~1.2.7",
        "vue-loader": "^15.2.6",
        "webpack": "^4.16.4",
        "webpack-bundle-analyzer": "~2.13.1",
        "webpack-cli": "^3.1.0"
    }

I've already added the meta-field to AndroidManifest, and tried to remove platforms, but without luck.

@Djip
Copy link
Author

Djip commented Jul 16, 2019

@EddyVerbruggen Did you hit this while resolving #67 ?

@Endless-explorer
Copy link

@EddyVerbruggen Did you hit this while resolving #67 ?
are you solve this problem, i get same error

@aishahrazak
Copy link

@Djip Not sure whether you managed to resolve this. But i'm just gonna put what helped me resolve the error for the benefit of someone else who might be running into the same issue.

Based on android gradle doc, it seems that this error is due to the transitive dependency.
To resolve this, add 'api' dependency in your app.gradle like so:

android{
  dependencies{
            api 'com.google.android.gms:play-services-base:16.0.1'
            api 'com.google.android.gms:play-services-basement:16.0.1'
  }
}

Then tns remove platform and re-add again before running the app again.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants