Using libgdx with Android Studio

感情迁移 提交于 2019-12-10 11:36:43

问题


According to libgdx wiki (http://goo.gl/fJgSab):

Android Studio is fully compatible with libGDX's Gradle based build system.

How exactly should one proceed to import the Android project generated by libgdx into Android Studio?


回答1:


If you have created the project using libGDX gradle build system, you will have a file build.gradle in the root directory. Just open Android studio and import project and select this file. It will automatically fetch required resources and create your project structure in Studio.




回答2:


You just need to import your gradle project into Android Studio

Migrating from Eclipse

Import into Android Studio

  1. In Android Studio, close any projects currently open. You should see the Welcome to Android Studio window.
  2. Click Import Project.
  3. Locate the project you exported from Eclipse, expand it, select the build.gradle file and click OK.
  4. In the following dialog, leave Use gradle wrapper selected and click OK. (You do not need to specify the Gradle home.)

I would also like to recommend using IntelliJ for libgdx over Android Studio as IntelliJ will allow you to work on Desktop and Html versions of you project as well.



来源:https://stackoverflow.com/questions/25235493/using-libgdx-with-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!