search

Home  >  Q&A  >  body text

android-studio - Android Studio 2.2 beta2 更新后强制将 Gradle 版本升级为 2.14.1,有没有遇到同样情况的?

今天早上更新了 Android Studio 2.2 beta2 版本,结果过不了编译了,提示如下图

点击 Fix 就自动将 gradle 版本改为 2.14.1,Android plugin 改为 2.1.3 了。

我的 gradle 版本原来是 2.10,Android plugin 是 2.1.0,今天更新后就无法使用 Android plugin 是 2.1.0 了,gradle 版本倒是可以换回 2.1.0。

因为项目打包需求,还是希望使用 2.10 和 2.1.0 的配置,有没有遇到同样情况的同学,麻烦给点提示,多谢!

阿神阿神2772 days ago549

reply all(3)I'll reply

  • 怪我咯

    怪我咯2017-04-17 17:40:26

    In this version update, Studio did something rogue - if your gradle directory is in the studio directory, after the update, studio will forcefully delete your 2.10 gradle and replace it with 2.14.1 for you. You need to download it again. One configuration goes in

    If your gradle directory has not been deleted, then just change the gradle directory pointing in the settings

    reply
    0
  • 迷茫

    迷茫2017-04-17 17:40:26

    After upgrading Android Studio to 2.1.3, other gradle versions in the gradle folder in the installation directory were inexplicably deleted, and the project was forcibly upgraded to gradle-2.14.1. Only versions 2.1.3 and above can be used. In fact, if there are no other special requirements for the gradle version, it is recommended to use a higher version. If you have the same compilation restrictions as the questioner, follow the steps below to restore to the original version: gradle文件夹中的其他gradle版本,强制升级到了gradle-2.14.1,项目中只能使用2.1.3以上的版本。其实要是对gradle版本没有其他特殊要求的话建议使用高一点的版本。如果跟题主一样要编译方面的限制的话,按照如下步骤恢复为原来的版本:

    • 首先查看android studio安装目录下的gradle文件夹,如果你的gradle-2.10文件夹已经被删除,就到http://gradle.android-studio.org/重新下载一个放到该目录。

    • 然后进入settings搜索gradle,修改Gradle home为下载好的gradle-2.10目录。

    • 最后修改项目中gradle/gradle-wrapper.properties文件的distributionUrl属性(如distributionUrl=https://services.gradle.org/distributions/gradle-2.4-all.zip),以及build.gradle文件中的gradle

      • First check the gradle folder in the android studio installation directory. If your gradle-2.10 folder has been deleted, Go to http://gradle.android-studio.org/ to download another one and put it in this directory.
    • 🎜Then enter settings, search for gradle, and modify Gradle home to the downloaded gradle-2.10 directory. 🎜🎜
    • 🎜Finally modify the distributionUrl property of the gradle/gradle-wrapper.properties file in the project (such as distributionUrl=https://services.gradle.org/ distributions/gradle-2.4-all.zip), and the gradle version in the build.gradle file, recompile, and everything is OK. 🎜🎜 🎜

      reply
      0
  • 怪我咯

    怪我咯2017-04-17 17:40:26

    Android Studio gradle plugin 确实是需要与特定版本的GradleIt is normal to use it together. It was the same before, just follow its requirements.

    reply
    0
  • Cancelreply