bundleRelease error on jitsi-meet project with 'react-native-iap'

145 Views Asked by At

Our project cloned from jitsi-meet . I'm trying to install for Android react-native-iap package manually using this guide . For jitsi-meet repository there are some different places where lines have to be inserted. When I installed manually following both guides, my project doesn't launch.

When I run ./gradlew bundleRelease in android folder. I got this error

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:minifyReleaseWithR8'.
> Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not resolve project :react-native-iap.
     Required by:
         project :app > project :sdk
      > The consumer was configured to find a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release'. However we cannot choose between the following variants of project :react-native-iap:
          - amazonReleaseRuntimeElements
          - playReleaseRuntimeElements
        All of them match the consumer attributes:
          - Variant 'amazonReleaseRuntimeElements' capability jitsi-meet:react-native-iap:8.0.10-jitsi-10856892 declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release':
              - Unmatched attributes:
                  - Provides attribute 'com.android.build.api.attributes.VariantAttr' with value 'amazonRelease' but the consumer didn't ask for it
                  - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it
                  - Provides attribute 'store' with value 'amazon' but the consumer didn't ask for it
          - Variant 'playReleaseRuntimeElements' capability jitsi-meet:react-native-iap:8.0.10-jitsi-10856892 declares a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release':
              - Unmatched attributes:
                  - Provides attribute 'com.android.build.api.attributes.VariantAttr' with value 'playRelease' but the consumer didn't ask for it
                  - Provides attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but the consumer didn't ask for it
                  - Provides attribute 'store' with value 'play' but the consumer didn't ask for it
        The following variants were also considered but didn't match the requested attributes:
          - Variant 'amazonDebugApiElements' capability jitsi-meet:react-native-iap:8.0.10-jitsi-10856892:
              - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release'
          - Variant 'amazonDebugRuntimeElements' capability jitsi-meet:react-native-iap:8.0.10-jitsi-10856892 declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release'
          - Variant 'amazonReleaseApiElements' capability jitsi-meet:react-native-iap:8.0.10-jitsi-10856892 declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release':
              - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component
          - Variant 'playDebugApiElements' capability jitsi-meet:react-native-iap:8.0.10-jitsi-10856892:
              - Incompatible because this component declares an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a runtime of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release'
          - Variant 'playDebugRuntimeElements' capability jitsi-meet:react-native-iap:8.0.10-jitsi-10856892 declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release'
          - Variant 'playReleaseApiElements' capability jitsi-meet:react-native-iap:8.0.10-jitsi-10856892 declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'release':
              - Incompatible because this component declares an API of a component and the consumer needed a runtime of a component

As I understand something with this string missingDimensionStrategy 'store', 'play' ( from this guide).

The jitsi-meet repo has 3 possible places with android defaultConfig {}

  1. android/sdk/build.gradle
  2. android/app/build.gradle
  3. twa/app/build.gradle Actually, for jitsi-meet we need install packages in this file android/sdk/build.gradle But my error appears for all 3 places where a tried to past this line missingDimensionStrategy 'store', 'play'

Version of react-native-iap

"react-native-iap": "^8.0.10"

Version of react-native

"react-native": "0.67.4"

Platforms I faced the error (IOS or Android or both?)

Android

Expected behavior

Build finished success after ./gradlew bundleRelease and/or react-native run-android commands

Actual behavior

There is the error (the error text above)

Tested environment (Emulator? Real Device?)

Both

Did anybody face with this error ? And Do you now how to solve this?

0

There are 0 best solutions below