-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Description
I create a new app and add Guardian.Android package and the app does not build.
I got this error Failed to resolve: com.squareup.okhttp3:okhttp-bom:4.10.0
I took time to investigate. The package prevents compilation with newer versions of AGP. I saw that okhttp-bom was added to the dependencies in 0.7 but I think it was not added properly.
To my understanding, you have to import a bom package using the platform keyword: implementation platform('com.squareup.okhttp3:okhttp-bom:4.10.0')
Reproduction
Detail the steps taken to reproduce this error, what was expected, and whether this issue can be reproduced consistently or if it is intermittent.
Where applicable, please include:
- Create a fresh app with Android Studio
- Add
implementation("com.auth0.android:guardian:0.8.0")to the dependencies - Sync gradle
Error
Unresolved dependencies
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.AgpVersionAttr' with value '8.5.1', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
- Variant 'apiElements':
- 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.5.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':
- 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.5.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' 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.5.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' 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.5.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')
Environment
- com.auth0.android:guardian:0.8.0
- Gradle 8.7
- AGP 8.5.1
- Android minSdkVersion 28