Build Error on andoird
Kiran0791 opened this issue · 4 comments
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
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'
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'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=8081FAILURE: 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
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