Open RohitBansal272 opened 3 days ago
Uninstall the current version with then reinstall with lower version works for me
Same here. I'm trying to build with the latest version of the package with Android SDK 33
Same problem here, on iOS it built normally, but on Android it returns the same error.
Update build.gradle (Project)
buildToolsVersion = "33.0.0" compileSdkVersion = 34 targetSdkVersion = 34
classpath("com.android.tools.build:gradle:7.1.2")
Update build.gradle (Project)
buildToolsVersion = "33.0.0" compileSdkVersion = 34 targetSdkVersion = 34
classpath("com.android.tools.build:gradle:7.1.2")
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.android.gms.internal.measurement.zzhx found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zzna found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznb found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznc found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznd found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzga found in modules jetified-play-services-measurement-19.0.2-runtime (com.google.android.gms:play-services-measurement:19.0.2) and jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) Duplicate class com.google.android.gms.measurement.internal.zzhe found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhf found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhg found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhh found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhi found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhj found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzio found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzit found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2)
Go to the documentation to learn how to Fix dependency resolution errors.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 21s error Failed to install the app. info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Update build.gradle (Project) buildToolsVersion = "33.0.0" compileSdkVersion = 34 targetSdkVersion = 34 classpath("com.android.tools.build:gradle:7.1.2")
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.android.gms.internal.measurement.zzhx found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zzna found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznb found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznc found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznd found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzga found in modules jetified-play-services-measurement-19.0.2-runtime (com.google.android.gms:play-services-measurement:19.0.2) and jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) Duplicate class com.google.android.gms.measurement.internal.zzhe found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhf found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhg found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhh found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhi found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhj found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzio found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzit found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 1m 21s error Failed to install the app. info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Can you share build.gradle ?
Update build.gradle (Project)
buildToolsVersion = "33.0.0" compileSdkVersion = 34 targetSdkVersion = 34
classpath("com.android.tools.build:gradle:7.1.2")
I tried this method and it is giving me other libraries error because they don't support target 34
Update build.gradle (Project) buildToolsVersion = "33.0.0" compileSdkVersion = 34 targetSdkVersion = 34 classpath("com.android.tools.build:gradle:7.1.2")
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.android.gms.internal.measurement.zzhx found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zzna found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznb found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznc found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.internal.measurement.zznd found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzga found in modules jetified-play-services-measurement-19.0.2-runtime (com.google.android.gms:play-services-measurement:19.0.2) and jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) Duplicate class com.google.android.gms.measurement.internal.zzhe found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhf found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhg found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhh found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhi found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzhj found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzio found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2) Duplicate class com.google.android.gms.measurement.internal.zzit found in modules jetified-play-services-measurement-base-20.1.2-runtime (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-19.0.2-runtime (com.google.android.gms:play-services-measurement-impl:19.0.2)
Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 1m 21s error Failed to install the app. info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Can you share build.gradle ?
ANDROID
// Top-level build file where you can add configuration options common to all sub-projects/modules. //def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
buildscript { ext { // kotlinVersion = '1.7.0' buildToolsVersion = "33.0.0" minSdkVersion = 21 compileSdkVersion = 34 targetSdkVersion = 34 // RNVUseExoplayerIMA = true useExoplayerIMA = true useExoplayerRtsp = true useExoplayerSmoothStreaming = true useExoplayerDash = true useExoplayerHls = true // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" } repositories { google() mavenCentral() } dependencies { classpath("com.android.tools.build:gradle") classpath("com.facebook.react:react-native-gradle-plugin") // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files classpath('com.google.gms:google-services:4.3.15') classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0") // classpath("com.android.tools.build:gradle") // classpath("com.facebook.react:react-native-gradle-plugin") // classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }
ANDROID/APP
apply plugin: "com.android.application" apply plugin: "com.facebook.react"
apply plugin: 'com.google.gms.google-services'
/**
def jscFlavor = 'org.webkit:android-jsc-intl:+'
Date.toLocaleString
and String.localeCompare
thatandroid {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
namespace 'br.com.tiindiquei.ntgospel'
defaultConfig {
applicationId "br.com.tiindiquei.ntgospel"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 6
versionName "2.0.0"
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android")
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
implementation platform('com.google.firebase:firebase-bom:28.4.2')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
// implementation("com.google.android.gms:play-services-ads:23.1.0")
implementation project(':react-native-video')
// implementation "androidx.appcompat:appcompat:1.0.0"
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
implementation project(':react-native-music-control')
implementation 'com.facebook.fresco:animated-gif:2.0.0' //use
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
//implementation project(':reactnativeradioplayer')
implementation 'com.android.support:multidex:1.0.3'
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
What happened?
I am getting the following error after installing the library
I tried changing
targetSdkVersion
to 34 and it is breaking other librariesPlatforms
Android, but have not tested behavior on iOS
React Native Info
Are your using Typescript?
package.json
app.json
ios/Podfile
No response
android/build.gradle
No response
android/app/build.gradle
No response
android/settings.gradle
No response
AndroidManifest.xml
No response