I got the error when i create a new Project using android studio.
below i attached a screenshots of error message..
I am using windows 7 (64 bit)
Please help me.
-
1go to File --> Settings --> click option-->Gradle location.go to Gradle download site, then download a local distribution of Gradle and check the Gradle location t dat directory.– SamMay 16, 2013 at 12:00
-
but i create a new project– Hardik NadiyaparaMay 16, 2013 at 12:14
-
possible duplicate of Could not fetch model of type 'IdeaProject' using Gradle installation– Eng.FouadJul 20, 2013 at 5:41
-
@siddharth lele and Eng.Fouad please see the asked question date– Hardik NadiyaparaJul 23, 2013 at 5:09
-
@HardikNadiyapara: And you are telling that to me because?? I haven't marked it as a duplicate. I merely added a tag to your question mate!!– Siddharth LeleJul 23, 2013 at 5:17
11 Answers
I also had an issue downloading gradle
through AndroidStudio
. I tried the following.
- Go to your
AndroidStudio
directory where you installed your studio LikeD:\User\AndroidStudio
- In
AndroidStudio
go to\AndroidStudio\plugins\gradle\lib
and copygradle.jar
- Paste
gradle.jar
file in\AndroidStudio\lib
directory. - Download gradle directly from Gradle
- Copy the contents of
gradle-1.6-bin.zip
- After extracting zip file -(bin, media, init.d, lib folders)
to\AndroidStudio\plugins\gradle
- Restart
AndroidStudio
* Updated Answer *
And after following all the steps listed above, if it is not working, Kindly check below things.
1) Please delete .gradle
folder from your user like C:\Document and Settings\AndroidUser\***\.gradle
2) You can check your HTTP Proxy
in Settings
.
Hope this helps!
-
14after completion of step provided by you, i create new project and it throws an error "org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings" May 18, 2013 at 7:27
-
6@Hardik Nadiyapara, I had the same problem as you after following these instructions. After deleting gradle.jar from \AndroidStudio\lib (the one you pasted in step 3) it works.– RotemMay 19, 2013 at 8:19
-
@HardikNadiyapara As
AndroidStudio
is in early preview access version, you can do two things 1) Please delete.gradle
folder from your user likeC:\Document and Settings\AndroidUser\***\.gradle
or 2) You can check yourHTTP Proxy Settings
.– user456118May 20, 2013 at 3:57 -
1@SiKni8 Hi, Google recently released newer version of Android Studio with some bug fixes. You can download that one. Thanks.– user456118Jul 20, 2013 at 15:29
-
2Nope! Made things more ugly and worse. This IDE is assigned for the biggest and most epic fail I have ever seen. Aug 8, 2014 at 0:27
In my case, it was sufficient to specify the location of the Gradle distribution included with Android Studio when requested.
On a mac, it was: /Applications/Android Studio.app/Contents/gradle/gradle-2.2.1
On Linux, it can be generalized to {android-studio-root}/grade/gradle-{version}
- First Create a New Project "
your_project
" - When the above stated error appears click
ok
- Now go to
IMPORT-> "your_project "
and follow the instruction - Your Project Is Created
Download gradle, and replace it with the file
gradle-1.6-bin.zip
located at:
C:\Users\<username>\.gradle\wrapper\dists\gradle-1.6-bin\<some_hash_key>\
If Android Studio offers you to choose home folder for gradle, just choose "Use customizable gradle". Then, if you see only gradle files, but no classes and resources - click on "Synchronize gradle" and it will be alrigth. Hope this helps
For me, this issue only occurs when using a proxy server. If you specify a proxy server in the settings, everything is working fine for me. You can specify a proxy server by File->Settings->HTTP Proxy
If you using ubuntu behind a proxy, in my case I'm using ctlm, you must change the jetbrains' proxy setting in /Home/UserName/.AndroidStudioPreview/config/options/other.xml
<option name="USE_HTTP_PROXY" value="true" />
<option name="PROXY_HOST" value="localhost" />
<option name="PROXY_PORT" value="8080" />
This is my configuration I don't need autentificated user.
bests Regards
-
-
And this is the only way it worked for me. not studio.properties, not idea. properties, no -Dhttp.proxy. Nothing. Only this. Thanks! Jan 9, 2015 at 16:34
Had the same problem I think because our internet set-up blocked access to https://dl-ssl.google.com site.I resolved in by downloading gradle 1.6 zip then extracted it in some folder.go to File --> Settings --> click option-->Gradle ,the check use local gradle distribution and point it to the extracted directory eg C:\android-studio\plugins\gradle\gradle-1.6-bin\gradle-1.6 Then it was okay
We have to change the android sdk source in the project settings to our sdk where we have installed the android build tools.
I had the same issue and by doing this, it worked. Thanks.
While importing the project I specified the location of the Gradle distribution.
On Windows 7 it was here:
C:\Program Files\Android-Studio\gradle\gradle-2.2.1
Check your proxy setting for gradle. If it still fails after set the HTTP Proxy in setting menu, you may add gradle.properties
as following.
First, go to the project directory. (By default-for Windows-, projects will be created to {user}\AndroidStudioProjects\{ProjectName}
).
And then create gradle.properties file as below.
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
you can also refer to the User's guide.
-
I have
gradle-wrapper.jar
andgradle-wrapper.properties
under thewrapper
folder. Still not working.– Si8Jul 19, 2013 at 20:30