7

I have updated the Android studio and just opened my project and I got the following error. Could you please let me know how to resolve this ?

Error:A problem occurred configuring project ':memoryGameCollectionFree'.
> Could not resolve all dependencies for configuration     ':memoryGameCollectionFree:_debugCompile'.
   > Could not find ads:AdQuality:unspecified.
 Searched in the following locations:
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository/ads/AdQuality/unspecified/AdQuality-unspecified.pom
     file:/C:/Program Files/Android/Android Studio/gradle/m2repository/ads/AdQuality/unspecified/AdQuality-unspecified.jar
     https://jcenter.bintray.com/ads/AdQuality/unspecified/AdQuality-unspecified.pom
     https://jcenter.bintray.com/ads/AdQuality/unspecified/AdQuality-unspecified.jar
     https://repo1.maven.org/maven2/ads/AdQuality/unspecified/AdQuality-unspecified.pom
     https://repo1.maven.org/maven2/ads/AdQuality/unspecified/AdQuality-unspecified.jar
     file:/C:/Users/Sudhakar/AppData/Local/Android/sdk/extras/android/m2repository/ads/AdQuality/unspecified/AdQuality-unspecified.pom
     file:/C:/Users/Sudhakar/AppData/Local/Android/sdk/extras/android/m2repository/ads/AdQuality/unspecified/AdQuality-unspecified.jar
     file:/C:/Users/Sudhakar/AppData/Local/Android/sdk/extras/google/m2repository/ads/AdQuality/unspecified/AdQuality-unspecified.pom
     file:/C:/Users/Sudhakar/AppData/Local/Android/sdk/extras/google/m2repository/ads/AdQuality/unspecified/AdQuality-unspecified.jar
 Required by:
     MemoryGameCollectionFree:memoryGameCollectionFree:unspecified > com.facebook.android:audience-network-sdk:4.12.0
iappmaker
  • 2,945
  • 9
  • 35
  • 76
  • 1
    Same here. It's related to the new version of Facebook Audience Network. I'd recommend you to use the version 4.11.0 until they push a fix – ThanosFisherman May 22 '16 at 00:16

4 Answers4

23

You need to change dependency to:

dependencies {
    ...
    compile 'com.facebook.android:audience-network-sdk:4.12.0@aar'
}
TGIO
  • 523
  • 8
  • 19
  • may be wrong place to ask, but what is the difference by appending @aar at the end. here : compile 'com.facebook.android:audience-network-sdk:4.12.0@aar' and compile 'com.facebook.android:audience-network-sdk:4.12.0' – Meghal Shah May 26 '16 at 18:38
  • by appending @aar you are explicitly requiring .aar artifact which is different from .jar because .jar cannot contain resource files such as layouts and etc. – TGIO May 26 '16 at 19:36
  • so by default 4.12.0 will try to load jar ? – Meghal Shah May 26 '16 at 19:50
  • yes if no extension is provided - it will load .jar – TGIO May 26 '16 at 20:05
4

The problem is due to the fact that Facebook updated version 4.12.0 of the Audience Network SDK that's in the Maven Repository and ended up introducing this problem, it's unrelated to you updating the version of Android Studio you're using. I started seeing this error yesterday and I checked today and found that on maven.org the "Updated" date for audience-network-sdk has changed to 20-May-2016.

Gordon
  • 315
  • 1
  • 3
  • 8
1

there is some problem with Maven Repository you have 2 options either you can manually download facebook sdk or change back to older version of audience network

currently sdk version 4.11 works fine

  compile 'com.facebook.android:audience-network-sdk:4.11.0'
APP Bird
  • 1,371
  • 1
  • 20
  • 37
-1

The Issue has been fixed in the latest Audience Network.

You need to update this dependency in build.gradle

compile 'com.facebook.android:audience-network-sdk:4.12.0@aar'

it will automatically get the latest one.

Atiq
  • 14,435
  • 6
  • 54
  • 69