I have created a project with libGDX setup ui. The project works great in Eclipse but when I imported it in Android Studio, the android project MainActivity.java throws 4 exceptions:
java: cannot access com.badlogic.gdx.Application
class file for com.badlogic.gdx.Application not found
java: cannot find symbol
symbol: variable super
location: class com.vestrel00.nekko.MainActivity
java: cannot find symbol
symbol: method initialize(com.vestrel00.nekko.KFNekko,com.badlogic.gdx.backends.android.AndroidApplicationConfiguration)
location: class com.vestrel00.nekko.MainActivity
java: method does not override or implement a method from a supertype
Does anyone have a solution?
So I've fixed my problem: I just added libGdx.jar files to my desktop and android projects.
Solution:
Right click on the project > Open Module Settings > Libraries > Small green button (New Project Library Alt+Insert) > Java > and then select libGdx.jar file. After that, you must include this library into your desktop and android projects.
Don't Close the window, select Modules > android > Dependencies > Small Green button > Module Dependency and select main project. Do the same for desktop and press Ok.
Thats all. All my projects work correctly now.
Here's a tutorial with images. It is explained how to run desktop project too.
http://imgur.com/a/IBFIV
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With