0

I am new to android studio. I couldn't create a project in Android Studio Beta 0.8.14 .

I am referred this Link to create a project.But finally I didn't able to see my created projected because of the below Exception.

I am getting this issue in Event Log:

02:21 PM ClassCastException: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings
02:21 PM ClassCastException: com.android.tools.idea.gradle.project.AndroidGradleProjectComponent@10bfc17: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings
02:23 PM Error running build (1): Module 'observablescrollview' is not backed by gradle
02:26 PM ClassCastException: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings: org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings

My downloaded Gradle is placed in this directory:

E:\Gradle\gradle-2.2

Then Gradle setup placed in this directory:(here I am copied and pasted the gradle zip files)

C:\Users\hai\ .gradle\wrapper\dists\gradle-2.1-all\27drb4udbjf4k88eh2ffdc0n55

My download android studio placed here:

E:\Android Studio\android-studio

Edited: This answer doesn't solve my problem.

I didn't know how to solve this errors.Anybody can help me with this.

Community
  • 1
  • 1
Stephen
  • 9,899
  • 16
  • 90
  • 137
  • You don't need to download your own copy of Gradle, and you shouldn't go messing around in Gradle's wrapper cache directories. I'd recommend deleting the **.gradle** directory in your home directory and creating a new project, allowing it to use the wrapper and download the appropriate distribution of Gradle. – Scott Barta Dec 03 '14 at 15:59
  • @ScottBarta Your answer solved my issue.Can you post as an answer? – Stephen Dec 04 '14 at 03:32

1 Answers1

1

With Android Studio, you generally don't need to download your own version of Gradle -- the IDE takes care of it for you. It does this via the Gradle wrapper, which is configured with a property for the correct version of Gradle, which it downloads on demand.

I think your error is happening because there are differing versions of Gradle floating around because by your description you've modified the contents of the Gradle wrapper's cache directory where it maintains that download. I'd recommend deleting the .gradle directory in your home directory, starting with a new project, and letting Android Studio use the wrapper and download the correct distribution of Gradle.

Scott Barta
  • 79,344
  • 24
  • 180
  • 163