简体   繁体   English

在android studio中导入项目时使用现有的gradle包装器

[英]using existing gradle wrapper while importing projects in android studio

I am using android studio for my android projects.I just got a problem when i imported an android studio project.The problem is that gradle is downloading wrapper 2.4 and i have 2.1.0 . 我正在为我的android项目使用android studio。当我导入一个android studio项目时遇到一个问题。问题是gradle正在下载wrapper 2.4 ,我有2.1.0 Is there a way to use older version by changing setting. 是否可以通过更改设置来使用旧版本。 I searched about it but i didn't find solutions specific to the problem.what i got is 我进行了搜索,但没有找到针对该问题的解决方案。我得到的是

How to set gradle home while importing existing project in Android studio 在Android Studio中导入现有项目时如何设置gradle home

How to use gradle zip in local system without downloading when using gradle-wrapper 使用gradle-wrapper时如何在不下载的情况下在本地系统中使用gradle zip

In my case, i don't have version 2.4 and want to use existing 2.1.0 就我而言,我没有版本2.4,并且想使用现有的2.1.0

Try to change the distributionUrl values with your currently version (2.1.0) and then : 尝试使用当前版本(2.1.0)更改distributionUrl值,然后:

./gradlew clean assemble

Remove .idea folder and all .iml files and import the project as new one. 删除.idea文件夹和所有.iml文件,然后将项目导入为新文件。

check this answer too: 也检查此答案:

https://stackoverflow.com/a/22366006/4409113 https://stackoverflow.com/a/22366006/4409113

And: Force Android Studio to download and install gradle 1.10 or 1.1 并且: 强制Android Studio下载并安装gradle 1.10或1.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM