Android studio问题:无法找到广告:AdQuality:未指定

时间:2016-05-21 16:30:31

标签: android android-studio facebook-android-sdk facebook-sdk-4.0 facebook-audience-network

我更新了Android工作室并刚刚打开我的项目,我收到以下错误。能告诉我如何解决这个问题吗?

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

4 个答案:

答案 0 :(得分:20)

您需要将依赖项更改为:

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

答案 1 :(得分:4)

问题是由于Facebook更新了Maven资源库中的Audience Network SDK版本4.12.0并最终引入了这个问题,这与您更新正在使用的Android Studio版本无关。我昨天开始看到这个错误,今天我查了一下,发现在maven.org上,audience-network-sdk的“更新”日期已经改为2016年5月20日。

答案 2 :(得分:2)

Maven Repository存在一些问题,您有2个选项,您可以手动下载facebook sdk或更改回较旧版本的受众网络

目前sdk版本4.11工作正常

  compile 'com.facebook.android:audience-network-sdk:4.11.0'

答案 3 :(得分:-1)

此问题已在最新的受众群体网络中修复。

您需要在build.gradle

中更新此依赖关系
compile 'com.facebook.android:audience-network-sdk:4.12.0@aar'

它将自动获得最新版本。