android-studiogradlelibgdxlibrariesoverlap2d

Android Studio, Gradle, how to use external library sources?


I'm not good about gradle, external libraries, and how that works. I have a specific problem, with libgdx and overlap2d libraries but my question is more about external libraries in general. So, let's go :

As I said, I'm using libgdx and overlap2d in android studio. There is an issue in overlap2d and someone fixed it. Explanation here. My first question is : how can I get this fix ? When I read the post it seems that the solution has been merged to the main branch, but I don't have it.

If I understood right, gradle downloads the external libraries to build the project. Am I right ? Should I do something special to force gradle to reload the libraries or is that automatic ? If so, why do I not see my problem fixed ?

I have other questions, but I'll ask them depending on the first answers. Thanks a lot.


Solution

  • If you import the dependency with Gradle through the repository cloud you can go tools->android->Sync project with Gradle files. But the fix you are talking about might not be merged with the dependency project you linked with. There might be a new repository that includes the fix (new version), look for a new version and just change the URL in your Gradle file to the new version. Android studio will ask if it should perform a Gradle sync for you when you change Gradle related files.

    If you have the library as a module inside your project you can just pull the new version from Git, replace it with your current library and tools->android->Sync project with Gradle files.