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

Build Error on andoird #21

Open
Kiran0791 opened this issue Sep 9, 2019 · 4 comments
Open

Build Error on andoird #21

Kiran0791 opened this issue Sep 9, 2019 · 4 comments

Comments

@Kiran0791
Copy link

Hi Below is the error m facing when build on android
Duplicate class com.google.android.gms.measurement.AppMeasurement found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$ConditionalUserProperty found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$Event found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$EventInterceptor found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$OnEventListener found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$Param found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.android.gms.measurement.AppMeasurement$UserProperty found in modules classes.jar (com.google.android.gms:play-services-measurement-impl:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.android.gms.tagmanager.zzcv found in modules classes.jar (com.google.android.gms:play-services-tagmanager-api:12.0.1) and classes.jar (com.google.android.gms:play-services-tagmanager-v4-impl:17.0.0)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics found in modules classes.jar (com.google.android.gms:play-services-measurement-api:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$Event found in modules classes.jar (com.google.android.gms:play-services-measurement-api:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$Param found in modules classes.jar (com.google.android.gms:play-services-measurement-api:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$UserProperty found in modules classes.jar (com.google.android.gms:play-services-measurement-api:17.2.0) and classes.jar (com.google.firebase:firebase-analytics-impl:12.0.1)

Can some on help me with this

@IsracardTeam
Copy link

Replace in \node_modules\react-native-activity-recognition\android\build.grade

api 'com.google.android.gms:play-services:+'

with

compile 'com.google.android.gms:play-services-location:17.0.0'

@neoassyrian
Copy link

I'm getting the same issue. I believe there is another issue reported for the same issue.
It seems a conflict with either firebase or OneSignal plugins and the Google Services version.

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':app:preDebugBuild'.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find com.google.firebase:firebase-bom:12.0.1.
Required by:
project :app > project :@react-native-firebase_analytics
project :app > project :@react-native-firebase_app
project :app > project :@react-native-firebase_dynamic-links
Could not find com.google.android.gms:play-services-ads-identifier:12.0.1.
Required by:
project :app > project :react-native-onesignal > com.onesignal:OneSignal:3.13.2
Could not find com.google.android.gms:play-services-measurement-base:12.0.1.
Required by:
project :app > project :@react-native-firebase_analytics > com.google.firebase:firebase-analytics:16.0.0
Could not find com.google.android.gms:play-services-stats:12.0.1.
Required by:
project :app > project :@react-native-firebase_analytics > com.google.firebase:firebase-analytics:16.0.0
Could not find com.google.firebase:firebase-measurement-connector:12.0.1.
Required by:

@benov84
Copy link

benov84 commented May 19, 2021

I'm getting the same issue. I believe there is another issue reported for the same issue.
It seems a conflict with either firebase or OneSignal plugins and the Google Services version.

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ':app:preDebugBuild'.

Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find com.google.firebase:firebase-bom:12.0.1.
Required by:
project :app > project :@react-native-firebase_analytics
project :app > project :@react-native-firebase_app
project :app > project :@react-native-firebase_dynamic-links
Could not find com.google.android.gms:play-services-ads-identifier:12.0.1.
Required by:
project :app > project :react-native-onesignal > com.onesignal:OneSignal:3.13.2
Could not find com.google.android.gms:play-services-measurement-base:12.0.1.
Required by:
project :app > project :@react-native-firebase_analytics > com.google.firebase:firebase-analytics:16.0.0
Could not find com.google.android.gms:play-services-stats:12.0.1.
Required by:
project :app > project :@react-native-firebase_analytics > com.google.firebase:firebase-analytics:16.0.0
Could not find com.google.firebase:firebase-measurement-connector:12.0.1.
Required by:

I have the same issue

@CAVAh
Copy link

CAVAh commented Oct 15, 2021

I replaced in \node_modules\react-native-activity-recognition\android\build.grade

api 'com.google.android.gms:play-services:+'

with

api 'com.google.android.gms:play-services-location:+'

and works

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

5 participants