错误:无法更改配置“:机器人:编译”之后已得到解决 [英] Error:Cannot change configuration ':android:compile' after it has been resolved

查看:206
本文介绍了错误:无法更改配置“:机器人:编译”之后已得到解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图谷歌,播放services.jar添加到我的项目,但我碰到这样的err.Why? (错误:无法更改配置:机器人:编译,它已被解决后)
有谁知道一个方法来解决这个问题呢?

I tried to add google-play-services.jar to my project but I faced with this err.Why? (Error:Cannot change configuration ':android:compile' after it has been resolved.) Does anybody know a way to resolve this problem?

推荐答案

在Android的工作室,你不需要添加jar文件,删除jar文件以及

In android studio you don't need to add jar files, Remove the jar file and


  1. 打开的build.gradle文件的应用模块目录中。

  1. Open the build.gradle file inside your application module directory.

请注意:Android的Studio项目包含一个顶级的build.gradle文件和每个模块的build.gradle文件。一定要编辑的文件,您的应用模块

Note: Android Studio projects contain a top-level build.gradle file and a build.gradle file for each module. Be sure to edit the file for your application module

添加一个新的构建规则下依赖关系的播放服务的最新版本。例如:

  • Add a new build rule under dependencies for the latest version of play-services. For example:

    dependencies {
    compile 'com.google.android.gms:play-services:7.8.0'
    }
    


  • 保存更改并单击同步项目与摇篮文件在工具栏中。

  • Save the changes and click Sync Project with Gradle Files in the toolbar.

    下面是官方链接

    这篇关于错误:无法更改配置“:机器人:编译”之后已得到解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆