小编Wol*_*gan的帖子

Android Studio拒绝接受已安装Google Repository

我想让AdMob运行起来.但由于某些奇怪的原因,我无法让Android Studio接受已安装Google Repository.事实是,它安装在SDK管理器中.并重新安装了多次.项目结构SDK路径与Android SDK Manager中的相同.

当我将鼠标悬停compile 'com.google.android.gms:play-services:6.+'在build.gradle 的行上时,我得到了这个工具提示:

"Dependency on Play Services, but the SDK installation does not have the "Extras > Google Repository" installed. Open the SDK manager and install it"
Run Code Online (Sandbox Code Playgroud)

当我尝试编译时,这个错误:

Error:Failed to resolve: com.google.android.gms:play-services:6.+
Run Code Online (Sandbox Code Playgroud)

有了这个错误,就会出现一个安装Repository的链接,我现在多次使用它.Android Studio并不关心.救命.

编辑:当我使用一个新的空项目时,它可以工作,Android Studio找到存储库.不知道这里发生了什么.

android android-studio android-gradle-plugin android-sdk-manager

7
推荐指数
1
解决办法
1977
查看次数