简体   繁体   中英

Error:Failed to find: com.google.guava:guava:18.0.+

I added this dependency to the gradle file

// This is used by the Google HTTP client library.

compile(group: 'com.google.guava', name: 'guava', version: '18.0.+')

I tried syncing the Gradle file but it keeps giving me this error

Error:Failed to find: com.google.guava:guava:18.0.+

It is because guava does not have a 'patch' version, only 'major' and 'minor' versions.

Try this instead:

compile(group: 'com.google.guava', name: 'guava', version: '18.0')

For future reference, you can search for your library's available versions by going to Maven Central: http://search.maven.org/

Here is the info for your Guava library: http://search.maven.org/#artifactdetails%7Ccom.google.guava%7Cguava%7C18.0%7Cbundle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM