-1

So I went onto the internet to find out how to export my libgdx project from android studio, and I learned that you can generate it by using the command gradlew desktop:dist. But when I type this into the terminal window in android studio, it says, 'gradlew' is not recognized as an internal or external command, operable program or batch file. Why is this happening?

T-Heron
  • 5,385
  • 7
  • 26
  • 52
George C.
  • 13
  • 2

1 Answers1

0

This is happening because the terminal can't find the gradlew program. If you're using Linux, make sure to type ./gradlew- but my guess is that you're using windows.

First, use your file browser to navigate to your project directory and make sure that gradlew.bat is present. If it isn't, you don't have gradlew as part of your project and need to go get it from The Gradle Website.

If you have gradlew.bat, make sure that your terminal is navigated to your project directory. On windows you can see where it is currently pointed using echo %cd% - if it doesn't show your current directory, you need to use the cd command to navigate to your project directory.

You can also confirm you're in the right place by running dir in the terminal- you should see gradlew.bat.

John
  • 1,440
  • 1
  • 11
  • 18