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.

Missing 2.1-SNAPSHOT from maven repo

See original GitHub issue

Hi guys,

could you put the missing 2.1-SNAPSHOT version in the repo again? Apparently there’s no way to force the substitute during annotation processing (or at least I haven’t found any), and gradle doesn’t tell me which library fails:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:apt'.
   > Could not find com.google.dagger:dagger-compiler:2.1-SNAPSHOT.
     Searched in the following locations:
     ...
     Required by:
         sharethemealandroid:app:unspecified

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
mrsashacommented, Mar 15, 2016

ok, @hamen so I found a workaround for this and a way to prevent this error if you use libraries that are outside of your control. It might be useful to other people who encounter the same problem.

THE WORKAROUND: we cannot control external repo content, but what we CAN do is put the missing libraries in the local repo used for support libraries, usually here: ~/Library/Android/sdk/extras/google/m2repository/com/google/. How to do this? When seeing the above referenced error:

A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
  > Could not find com.google.dagger:dagger:2.1-SNAPSHOT.
    Searched in the following locations:

this searched in the following locations also mentions local repo - it will have file and not http URL - with a list of files he failed to find, like this:

file:~/Library/Android/sdk/extras/google/m2repository/com/google/dagger/dagger/2.1-SNAPSHOT/maven-metadata.xml
        file:~/Library/Android/sdk/extras/google/m2repository/com/google/dagger/dagger/2.1-SNAPSHOT/dagger-2.1-SNAPSHOT.pom
        file:~/Library/Android/sdk/extras/google/m2repository/com/google/dagger/dagger/2.1-SNAPSHOT/dagger-2.1-SNAPSHOT.jar

Now you can go and download the relevant files you want to use from jcenter.com or any other repo (I used the 2.1 release version), rename them as SNAPSHOT files, and put them in the above referenced folders. Gradle will now find them and you don’t have to look for the offending library (at least not immediately).

HOW TO PREVENT (for obvious reasons, you can do this only when you’ve fixed the problem):

  • enable offline builds in Android Studio (File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Offline work option) OR
  • use gradle build -g ./gradle-libs to put cached libraries in your local folder ./gradle-libs and then build using gradle assemble --offline -g ./gradle-libs; refresh the libraries only when you update gradle file, but make a backup of the cached libs folder in case something goes wrong.
0reactions
mrsashacommented, Mar 15, 2016

Yes, once it’s fixed then it’s trivial to do gradle app:dependencies to find which library uses which version and then submit an issue or a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - "The POM for ... is missing, no dependency information ...
1) Quick workaround : looking for in the internet the pom.xml of the artifact · 2) Clean workaround for a single Maven project...
Read more >
Running Maven
Missing Dependencies​​ The most common cause is because it can not be redistributed from the repository and must be manually installed using the...
Read more >
349347 – POM Dependencies and Feature can't ... - Bugs
I'm creating some maven artifacts that have had the manifest updated with OSGI information using the maven-bundle-plugin. I want to use Tycho to...
Read more >
Problems while upgrading a GWT maven project from GWT ...
I tried to upgrade a working GWT maven project from GWT 2.1 SNAPSHOT ... plugin'. A required class is missing: org/codehaus/plexus/util/xml/
Read more >
4 Installing and Configuring the Archiva Maven Repository ...
Any existing continuous integration builds that refer to the snapshot fail with a missing dependency message after the dependency is deleted from the...
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