Gradle wrapper not found issue when building a flutter apk

1.9k views Asked by At

I am getting below error when I am trying to build apk or run it on a simulator. I tried with vs Code and Android Studio both, but the same error.

But when I am running the app on a browser or as a windows app, it's working perfectly.

Error: -

PS D:\Final_Code_GIT\Research & Development\AndroidApp\flutter_application> flutter build apk
Building with sound null safety

'Development\AndroidApp\flutter_application\android\' is not recognized as an internal or external 
command,operable program or batch file.

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain

Running Gradle task 'assembleRelease'...                           363ms

Gradle task assembleRelease failed with exit code 1

Thanks in advance, Stay Safe.

1

There are 1 answers

0
Siddhartha Das On BEST ANSWER

"Research & Development" remove space and rename this folder to something like "Research&Development" or "ResearchAndDevelopment" and then try building app – Aakash kondhalkar