Skip to content

Unable to build with default generated project #42

@colonelpopcorn

Description

@colonelpopcorn

I'm getting a build error from the default capacitor.build.gradle script generated by npx cap sync. The build warns (Failed to resolve: io.opentelemetry:opentelemetry-bom:1.18.0) when I try to run Gradle sync with the generated plugins project, and errors when I try to build the app project. See this stack trace for the error:

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve io.opentelemetry:opentelemetry-bom:1.18.0.
     Required by:
         project :app > project :recognizebv-capacitor-plugin-msauth > com.microsoft.identity.client:msal:4.9.0
      > No matching variant of io.opentelemetry:opentelemetry-bom:1.18.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.3.1' but:
          - Variant 'apiElements' capability io.opentelemetry:opentelemetry-bom:1.18.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.3.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)
          - Variant 'enforcedApiElements' capability io.opentelemetry:opentelemetry-bom-derived-enforced-platform:1.18.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.3.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)
          - Variant 'enforcedRuntimeElements' capability io.opentelemetry:opentelemetry-bom-derived-enforced-platform:1.18.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.3.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)
          - Variant 'runtimeElements' capability io.opentelemetry:opentelemetry-bom:1.18.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.3.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)

Android Studio Version: Iguana | 2023.2.1
Java Version: corretto 17.0.10-amzn
Gradle Version: 8.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions