Trying to make old project work again, eclipse+gradle issues

Anything libgdx related goes here!

Trying to make old project work again, eclipse+gradle issues

Postby davidbv » Wed Nov 27, 2019 10:07 pm

I have a project that wasn't touched in almost 2 years, and never was very experienced in Java or Gradle, so now I am having great difficulty to have it up and running again.

The problem seems to be with dependencies on the Desktop project:

Image

I tried the "Gradle STS/ Refresh Dependencies" and "Refresh All" options, and also I removed the .gradle directory in my user folder, but nothing happens, nothing gets redownloaded nor I get anything on eclipse console at all.

I wondered if reimporting the gradle project might help, but I can no longer import, I get this when I select the project folder and try to build model:

Image

I have no idea what log it refers to, googling the error didn't help.

I am aware Eclipse is now not the recommended IDE, but worked fine for me and I know all the shortcuts, so if possible at all, I'd like it to work, or at least give it a try.

Android is building OK, no idea what's wrong with desktop here.

Any help is welcome, thanks in advance.
davidbv
 
Posts: 107
Joined: Fri Oct 10, 2014 11:16 am

Re: Trying to make old project work again, eclipse+gradle is

Postby QuiIIraven » Thu Nov 28, 2019 11:56 am

you can set eclipse hotkeys in Intellij fyi. so that should not block you from switching.

Anyway, I don't know what exactly you did but I guess you have some classes in the core project?

If that is the case then most likely the simplest way to fix it is to run the newest setup again and create an empty project.

Then simply copy and paste your classes to the new project.

Especially in gradle a lot of things changed in the last two years so if possible start from a clean new project instead of trying to migrate your existing one.
QuiIIraven
 
Posts: 98
Joined: Sat Jun 02, 2018 4:59 pm

Re: Trying to make old project work again, eclipse+gradle is

Postby davidbv » Thu Nov 28, 2019 3:38 pm

QuiIIraven wrote:you can set eclipse hotkeys in Intellij fyi. so that should not block you from switching.

Anyway, I don't know what exactly you did but I guess you have some classes in the core project?

If that is the case then most likely the simplest way to fix it is to run the newest setup again and create an empty project.

Then simply copy and paste your classes to the new project.

Especially in gradle a lot of things changed in the last two years so if possible start from a clean new project instead of trying to migrate your existing one.


Thanks, I will try that. One question, is there a way to download the gdx-setup jar for old version 1.9.8? something in 1.9.9+ breaks all my UI; I know that eventually I have to move to intellij and to latest libgdx, but for now...
davidbv
 
Posts: 107
Joined: Fri Oct 10, 2014 11:16 am

Re: Trying to make old project work again, eclipse+gradle is

Postby QuiIIraven » Thu Nov 28, 2019 4:06 pm

just change the libgdx version in build.gradle from 1.9.10 to 1.9.8 then you get the older jars
QuiIIraven
 
Posts: 98
Joined: Sat Jun 02, 2018 4:59 pm

Re: Trying to make old project work again, eclipse+gradle is

Postby davidbv » Thu Nov 28, 2019 10:29 pm

I created the new project, copied my folders and gradle files over and sadly got the exact same result, Gradle seems to not do anything when I refresh...

I am using gradle 5.4.1, may it be too new for old LibGDX?
davidbv
 
Posts: 107
Joined: Fri Oct 10, 2014 11:16 am

Re: Trying to make old project work again, eclipse+gradle is

Postby QuiIIraven » Fri Nov 29, 2019 2:05 am

I told you to only copy your class files from from the core project.
if you copy everything then what is even the purpose of the fresh new project?
QuiIIraven
 
Posts: 98
Joined: Sat Jun 02, 2018 4:59 pm

Re: Trying to make old project work again, eclipse+gradle is

Postby davidbv » Sun Dec 01, 2019 7:59 pm

QuiIIraven wrote:I told you to only copy your class files from from the core project.
if you copy everything then what is even the purpose of the fresh new project?


You are, of course, right. And thanks for your help.

However I was running into so many issues with Eclipse having errors with build tools higher than 25.03 so I decided to give a shot to Android Studio.

I managed to import the project and now I am battling with a few issues, but I think it's better if I open another thread for that. I'll only return here if for some reason I try Eclipse once more.
davidbv
 
Posts: 107
Joined: Fri Oct 10, 2014 11:16 am

Re: Trying to make old project work again, eclipse+gradle is

Postby TheodoreJaxson » Wed Jan 08, 2020 12:47 pm

We're getting a few crash reports like this. We suspect this may have something to do with how libgdx is deployed for Android app bundle. How to address this issue?

Caused by java.lang.UnsatisfiedLinkError
dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/ourpackage-1/base.apk"],nativeLibraryDirectories=[/data/app/ourpackage.1/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libgdx.so"
java.lang.Runtime.loadLibrary (Runtime.java:379)
java.lang.System.loadLibrary (System.java:988)
com.badlogic.gdx.utils.SharedLibraryLoader.load (SharedLibraryLoader.java:119)
com.badlogic.gdx.utils.GdxNativesLoader.load (GdxNativesLoader.java:33)
com.badlogic.gdx.backends.android.AndroidApplication.<clinit> (AndroidApplication.java:63)
java.lang.reflect.Constructor.newInstance (Constructor.javafedloan irs.gov easybib
TheodoreJaxson
 
Posts: 2
Joined: Tue Dec 17, 2019 10:47 am

Re: Trying to make old project work again, eclipse+gradle is

Postby shatterblast » Wed Jan 08, 2020 9:35 pm

Use the APK Bundle option instead.
shatterblast
 
Posts: 653
Joined: Sun Jul 06, 2014 1:14 pm


Return to Libgdx

Who is online

Users browsing this forum: petr@neziskovky.com and 1 guest