I have a libGDX project(which is also desktop compatible) and would like to export its desktop application to a JAR file, to run it like a standalone application. How can I do this with use of Android Studio?
Your LibGDX projects are still gradle-based, whatever IDE you are using.
Thus you can use Gradle on the Commandline to package your application.
For desktop you do this via gradlew desktop:dist
. After that the resulting runnable jar file will be in desktop/build/libs/
.