Skip to content

The dependencie 'com.squareup.okhttp3:okhttp-bom:4.10.0' is crashing #116

@MauricioMej

Description

@MauricioMej

Description

I'm trying to implement the SDK in react native CLI, but when is building, the dependencie okhttp3 crash the build.

implementation 'com.squareup.okhttp3:okhttp-bom:4.10.0'

Reproduction of issue

I import the SDK into react native

Sample:

  • Code sample:
    • I create a simple react native project
npx react-native init Example

And i import the Guardian SDK

  • Log files:
* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.squareup.okhttp3:okhttp-bom:4.10.0.
     Required by:
         project :app > com.auth0.android:guardian:0.8.0
      > No matching variant of com.squareup.okhttp3:okhttp-bom:4.10.0 was found. The consumer was configured to find a library for use during runtime, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.2.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - Variant 'apiElements' capability com.squareup.okhttp3:okhttp-bom:4.10.0:
              - Incompatible because this component declares a platform for use during compile-time and the consumer needed a library for use during runtime        
              - Other compatible attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.2.1')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'enforcedApiElements' capability com.squareup.okhttp3:okhttp-bom-derived-enforced-platform:4.10.0:
              - Incompatible because this component declares an enforced platform for use during compile-time and the consumer needed a library for use during runtime
              - Other compatible attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.2.1')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'enforcedRuntimeElements' capability com.squareup.okhttp3:okhttp-bom-derived-enforced-platform:4.10.0 declares a component for use during runtime:
              - Incompatible because this component declares an enforced platform and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.2.1')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'runtimeElements' capability com.squareup.okhttp3:okhttp-bom:4.10.0 declares a component for use during runtime:
              - Incompatible because this component declares a platform and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.2.1')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
  • Application settings:

build.gradle

dependencies {
      implementation("com.facebook.react:react-android")
      implementation 'com.auth0.android:guardian:0.8.0'

      if (hermesEnabled.toBoolean()) {
          implementation("com.facebook.react:hermes-android")
      } else {
          implementation jscFlavor
      }
  }

Environment

Please provide the following:

  • Version of this library used: Guardian 0.8.0
  • Version of the platform or framework used, if applicable: React Native 0.74.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions