0

The following error occurs when I update the build.gradle file. I use the build version as 27.0.2 and compile 'com.android.support:appcompat-v7:26.0.1' is among some of the dependancies that I require. Does anyone know what might be the cause of the issue and the solution?

Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve com.android.support:support-compat:27.0.2.

Could not resolve com.android.support:support-compat:27.0.2. Required by: project :app > com.google.android.gms:play-services:10.2.6 > com.google.android.gms:play-services-cast:10.2.6 > com.android.support:mediarouter-v7:25.2.0 > com.android.support:palette-v7:25.2.0 Could not resolve com.android.support:support-compat:27.0.2. Could not parse POM https://maven.google.com/com/android/support/support-compat/27.0.2/support-compat-27.0.2.pom

Content is not allowed in prolog.

Arya
  • 1,729
  • 3
  • 17
  • 35
  • It's probably because of different versions of build and Gradle. try to use the same version and let me know then. – Tanvir Durlove Feb 14 '18 at 06:42
  • Maybe you have a bad version of the file https://maven.google.com/com/android/support/support-compat/27.0.2/support-compat-27.0.2.pom cached locally. See also https://stackoverflow.com/questions/13565082/how-can-i-force-gradle-to-redownload-dependencies – Henry Feb 14 '18 at 07:04
  • @TanvirDurlove They are already of the same version. – Ajmal Azeez Feb 14 '18 at 07:08
  • Thanks @Henry. It was some issue with the cache. Cleared it and it is working now. – Ajmal Azeez Feb 14 '18 at 09:24

0 Answers0