I am trying to test to reference without copying a library Project. So I created two projects one is ProjectA and one is LibraryA. Both project
One of your projects does not have a valid gradle file. If your library is not a gradle project convert it to gradle project.
If you add your library as a module and select "gradle" when you are importing i think you'll solve your problem.