HMS-Core / hms-react-native-plugin

This repo contains all of React-Native HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
235 stars 67 forks source link

Site-kit example does not work #248

Closed megaacheyounes closed 8 months ago

megaacheyounes commented 1 year ago

HMS Site kit example app does NOT work

logs

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class com.facebook.imagepipeline.cache.CountingMemoryCacheInspector found in modules jetified-imagepipeline-base-2.5.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.5.0) and jetified-stetho-2.0.0-runtime.jar (com.facebook.fresco:stetho:2.0.0)
  Duplicate class com.facebook.imagepipeline.cache.CountingMemoryCacheInspector$DumpInfo found in modules jetified-imagepipeline-base-2.5.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.5.0) and jetified-stetho-2.0.0-runtime.jar (com.facebook.fresco:stetho:2.0.0)
  Duplicate class com.facebook.imagepipeline.cache.CountingMemoryCacheInspector$DumpInfoEntry found in modules jetified-imagepipeline-base-2.5.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.5.0) and jetified-stetho-2.0.0-runtime.jar (com.facebook.fresco:stetho:2.0.0)

  Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

how to reproduce:

megaacheyounes commented 1 year ago

I resolve above issue by updating flipper version in android/gradle.properties

FLIPPER_VERSION=0.99.0

and increase the TargetSdk and compileSdk versions in project level build.gradle to 31:

ext { 
        minSdkVersion = 19
        compileSdkVersion = 31
        targetSdkVersion = 31
        kotlin_version = '1.3.70'
    }