I managed to fix it!
I was loading the library in an other class and my MainActivity was calling it when the button was pressed, therefore when GDB was ready no libraries where loaded... I thought that GDB will pick up the new library during runtime, so in order to load the library I just added the following lines in the static constructor of the first called class:
static {
System.loadLibrary("test-java");
}