I am porting an ios capacitor plugin to android.
got the build to work. for the plugin
now made a test app to make sure it all works like the ios version,
but I have a build problem… the plugin uses a third party lib, pulled from private jetbrains maven repo.
built plugin
npm install plugin in app
npx cap sync shows plugin installed…
ionic capacitor build android succeeds ok
opens android studio (new… can I get last?)
now run/debug app gradle build fails
> Could not find com.estimote:uwb-sdk:1.0.0-rc5.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/estimote/uwb-sdk/1.0.0-rc5/uwb-sdk-1.0.0-rc5.pom
- https://repo.maven.apache.org/maven2/com/estimote/uwb-sdk/1.0.0-rc5/uwb-sdk-1.0.0-rc5.pom
- file:/Users/sam/ionic/fribble/android/capacitor-cordova-android-plugins/src/main/libs/uwb-sdk-1.0.0-rc5.jar
- file:/Users/sam/ionic/fribble/android/capacitor-cordova-android-plugins/src/main/libs/uwb-sdk.jar
- file:/Users/sam/ionic/fribble/android/app/libs/uwb-sdk-1.0.0-rc5.jar
- file:/Users/sam/ionic/fribble/android/app/libs/uwb-sdk.jar
Required by:
project :app > project :estimoteplugin
in the plugin I had to add a repository
maven {
url = uri("https://estimote.jfrog.io/artifactory/android-proximity-sdk/")
}
and a dependency
implementation("com.estimote:uwb-sdk:1.0.0-rc5")
now (sorta like the IOS app problem of the same vendor lib), the lib is not found.
so I add the maven lib to the app repositories
maven {
url = uri("https://estimote.jfrog.io/artifactory/android-proximity-sdk/")
}
ionic capacitor build android
opens android studio, push debug
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.estimote:uwb-sdk:1.0.0-rc5.
tried adding as a dependency in app, now get other errors
Cause 1: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve androidx.core.uwb:uwb:1.0.0-alpha07.
Required by:
project : > com.estimote:uwb-sdk:1.0.0-rc5
Caused by: org.gradle.internal.component.NoMatchingGraphVariantsException: No matching variant of androidx.core.uwb:uwb:1.0.0-alpha07 was found. The consumer was configured to find a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.6' but:
- Variant 'libraryVersionMetadata' capability androidx.core.uwb:uwb:1.0.0-alpha07 declares a component, and its dependencies declared externally:
- Incompatible because this component declares documentation for use during 'library-version-metadata' and the consumer needed a library for use during runtime
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'releaseVariantReleaseApiPublication' capability androidx.core.uwb:uwb:1.0.0-alpha07 declares a library, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, with the library elements 'aar' and the consumer needed a component for use during runtime, packaged as a jar
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'releaseVariantReleaseRuntimePublication' capability androidx.core.uwb:uwb:1.0.0-alpha07 declares a library for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, packaged as a jar
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'sourcesElements' capability androidx.core.uwb:uwb:1.0.0-alpha07 declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
Cause 3: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve no.nordicsemi.android:ble-ktx:2.4.1.
Required by:
project : > com.estimote:uwb-sdk:1.0.0-rc5
Caused by: org.gradle.internal.component.NoMatchingGraphVariantsException: No matching variant of no.nordicsemi.android:ble-ktx:2.4.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.6' but:
- Variant 'releaseVariantReleaseApiPublication' capability no.nordicsemi.android:ble-ktx:2.4.1 declares a library, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, with the library elements 'aar' and the consumer needed a component for use during runtime, packaged as a jar
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')
- Variant 'releaseVariantReleaseRuntimePublication' capability no.nordicsemi.android:ble-ktx:2.4.1 declares a library for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares a component, with the library elements 'aar' and the consumer needed a component, packaged as a jar
- Other compatible attributes:
- Doesn't say anything about its target Java version (required compatibility with Java 17)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.6')