-1

Trying to run my app, this is an error I'm getting from the Gradle Build:

Error:A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApkCopy'. Could not find any version that matches com.google.android.gms:play-services-vision:9.4.0.+. Versions that do not match: 11.0.2 11.0.1 11.0.0 10.2.6 10.2.4 + 17 more Required by: project :app

Here's what my dependencies look like:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// Important - the CameraSource implementation in this project requires version 8.1 or higher.
compile 'com.android.support:support-v4:24.2.0'
compile 'com.google.android.gms:play-services-vision:9.4.0.+'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'

I've tried to update the play services through Tools>Android SDK>..
I've read some other posts and people have similar problems, but the fixes don't work. I was also hoping to understand the issue a bit more.

Thanks

Gprice1148
  • 19
  • 6
  • Have you tried changing "9.4.0.+" to "11.0.2" or any of the other versions that appear in the list in the error message? – Dave Jul 20 '17 at 14:04
  • @Dave When I change what you suggest, compile 'com.android.support:support-v4:24.2.0' gives me an error saying all com.android.support libraries must use the same version. But, both support libraries are 24.2.0 as shown in the dependencies code I pasted above. – Gprice1148 Jul 20 '17 at 14:56

2 Answers2

0

Try :

  • A full clean and rebuild
  • Uninstalling/installing android support repository
ToYonos
  • 16,469
  • 2
  • 54
  • 70
0

Your specification of "9.4.0.+" is not correct. Maybe you meant something like "9.4.+", but at any rate dynamic dependencies aren't a great idea IMHO. The error message lists the most recent version available on your machine as "11.0.2" (which is the most recent version at the time of writing). Use that instead. According to your comment above, this part of your problem is clearly resolved.

As to your other problem ("support libraries must use the same version"), something (play-services-vision or constraint-layout) most likely pulls in a different version of some part of the support libraries. You should look at this SO question to track down where your dependencies are coming from. You will need to make sure and use compatible versions of everything. In the end, it may suffice to just make sure you have the latest version of each.

Dave
  • 4,282
  • 2
  • 19
  • 24