question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unresolvable dependency after 1.30.8

See original GitHub issue

Environment details

  1. OS type and version: Linux
  2. Java version: 8
  3. google-api-client version(s): 1.30.8

Steps to reproduce

  1. Attempt to build and resolve dependencies with Ivy.
  2. Ivy fails to resolve androidx.annotation#annotation;1.1.0.

Code example

<dependency org="com.google.api-client" name="google-api-client" rev="1.30.8" conf="compile->default"/>

Stack trace

:: problems summary ::
:::: WARNINGS
		module not found: androidx.annotation#annotation;1.1.0

	==== central: tried

	  https://repo1.maven.org/maven2/androidx/annotation/annotation/1.1.0/annotation-1.1.0.pom

	  -- artifact androidx.annotation#annotation;1.1.0!annotation.jar:

	  https://repo1.maven.org/maven2/androidx/annotation/annotation/1.1.0/annotation-1.1.0.jar

		::::::::::::::::::::::::::::::::::::::::::::::

		::          UNRESOLVED DEPENDENCIES         ::

		::::::::::::::::::::::::::::::::::::::::::::::

		:: androidx.annotation#annotation;1.1.0: not found

		::::::::::::::::::::::::::::::::::::::::::::::

Any additional information below

Previous versions up to 1.30.7 build without any problems.

This seems to mention a similar error, but I am not positive if it is related: https://github.com/googleapis/google-api-java-client/pull/1467#issuecomment-572505559

[ERROR] /tmpfs/src/github/google-api-java-client/google-api-client/src/main/java/com/google/api/client/googleapis/GoogleUtils.java:[17,26] error: package androidx.annotation does not exist

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
anuraagacommented, Feb 14, 2020

tl;dr Sent #1491 which I think should make everyone happy. But I see more issues here than just a POM file so let me provide some opinion.

Since this is a library for developers, shouldn’t developer experience be a higher priority than philosophy regarding how maven or gradle should work? I think you’d be hard pressed to find even one other library on Maven Central that requires resolving artifacts from a separate repository. In fact, it’s strongly discouraged by Maven Central

http://maven.apache.org/repository/guide-central-repository-upload.html

It’s true that Google’s isn’t a “sketchy” repository, but keeping builds simple and easy to reason about is likely just as much a motivation for this recommendation. Requiring Gradle users to add an additional repository primarily for Android to non-Android Java builds will make them slower (more repositories to resolve from) and confusing (the README change only adds a single line, google(), but in practice, everyone needs additional lines of comments to explain this is necessary solely to use a simple API client).

But anyways, the problem here can be solved without affecting user builds by replacing the annotation with an embedded proguard file in resources. I can’t find much documentation besides this tweet and another library that uses the technique

https://twitter.com/jakewharton/status/1004401938467876865?lang=en https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro

You can ask the android team to publish this artifact on Maven Central. I don’t know why they don’t.

Sorry I do have to comment about my disappointment at this statement. It would be much more expedient to work out this sort of issue internally (and probably gotten a quick tip about embedded proguard to boot!) than force your users to follow up.

2reactions
rleibmancommented, Feb 13, 2020

I would prefer not to add the dependency, but given the stuborness that the dependency must be there… may I suggest that semantic versioning is thus broken and you should definitely increase at least the minor number? Something that breaks the build should most certainly NOT be a patch only increase.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unresolvable dependency (Laravel 8) - php - Stack Overflow
using "jasny/sso" package, I'm getting following error: Illuminate\Contracts\Container ...
Read more >
Qemu-base & Qemu-desktop conflicting dependencies
I'm a new user to Garuda and am getting the following message on a ... for conflicting packages... error: unresolvable package conflicts ......
Read more >
Unresolvable dependency (Laravel 8) - Laracasts
using "jasny/sso" package, I'm getting following error: Illuminate\Contracts\Container\BindingResolutionException Unresolvable dependency resolving ...
Read more >
I cant install xboxdrv - Newbie - EndeavourOS Forum
Whenever you're installing new software, it's always a good idea to be up to date. Try running sudo pacman -Syu and then try...
Read more >
ID-81-07 The Potential for Diversifying Oil Imports by ...
foreign oil sources in order to reduce dependency ... dependency has (1) increased since the Arab oil embargo and price ... 1.30.8. ---e-H+....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found