talawa icon indicating copy to clipboard operation
talawa copied to clipboard

FAILURE: Build failed with an exception.

Open PrabeshPP opened this issue 2 years ago • 13 comments

Describe the bug When the Project is run ,it throws an error saying it requires JAVA version 11.

To Reproduce Steps to reproduce the behavior:

1.Fork the repository. 2.Run git clone (Repo URL). 3.Run the flutter pub get command in terminal. 4.Run the develop branch in VS Code.

Expected behavior Was expecting it to run on my local machine in order to contribute on this Project.

Actual behavior It threw an error saying it requires Java Version 11.However,my other projects that I have been working runs perfectly.

Screenshots issue1

Additional details

PrabeshPP avatar Mar 15 '22 04:03 PrabeshPP

Congratulations on making your first Issue! :confetti_ball: If you haven't already, check out our Contributing Guidelines and Issue Reporting Guidelines to ensure that you are following our guidelines for contributing and making issues.

github-actions[bot] avatar Mar 15 '22 04:03 github-actions[bot]

Thanks. You will need to upgrade your SDK version to that of the Talawa project. Java 11 should work. We do all our automated testing using Java 12, and therefore should probably upgrade the gradle settings accordingly.

palisadoes avatar Mar 15 '22 04:03 palisadoes

hey @palisadoes , should I upgrade my flutter SDK version or ?

PrabeshPP avatar Mar 15 '22 05:03 PrabeshPP

In Android Studio you can assign a Java SDK version to a particular project. I'm not sure about other IDEs

palisadoes avatar Mar 15 '22 05:03 palisadoes

Okay ,I will try that solution. What about on VS code??

PrabeshPP avatar Mar 15 '22 05:03 PrabeshPP

Hi @palisadoes it shows the same error even after upgrading the Java SDK version to 11.

PrabeshPP avatar Mar 15 '22 07:03 PrabeshPP

@PrabeshPP I think there is some issue with your vscode configuration. Try running flutter doctor to check if there is an error.

noman2002 avatar Mar 16 '22 03:03 noman2002

hi @noman2002 I did try running the flutter doctor ,but there is no error. I will re-install the VS code. Hope it would work.

PrabeshPP avatar Mar 16 '22 14:03 PrabeshPP

hi @noman2002 I did try running the flutter doctor ,but there is no error. I will re-install the VS code. Hope it would work.

Is it working after reinstallation?

noman2002 avatar Mar 17 '22 10:03 noman2002

Even after re-installation , it's showing same error.

PrabeshPP avatar Mar 17 '22 13:03 PrabeshPP

Even after re-installation , it's showing same error.

Text on slack. Someone will help you there for sure.

noman2002 avatar Mar 17 '22 13:03 noman2002

@PrabeshPP the problem is not with flutter setup the problem is with the non appropriate jdk version

CyberWake avatar Mar 17 '22 17:03 CyberWake

Follow the below steps :

  1. Run flutter clean
  2. go to android/ and run ./gradlew clean

Repeat step 2 until it executes 100% successfully.

saksham-gt avatar Mar 30 '22 09:03 saksham-gt