Unable to build Gradle Project While creating new project or importing project

If we unable build project first we have to check JRE System library version in build path. If version is different we have to change corresponding version.

  • For changing corresponding JRE version in eclipse
    Righe click on project -> Select Build path -> Configure Build Path->Select JRE System Library -> Edit -> select execution environment according to your java version and select environments in that select same version -> finish
  • In build.gradle file change JRE version according your java version
    sourceCompatibility = 1.7
    targetCompatibility = 1.7