Hey kasdev,
The Dynatrace Android Gradle plugin can only be used in projects that use the Android Gradle plugin to build an Android app. It is not possible to instrument an (independent) library project, because this use case is not supported by Dynatrace.
Can you share the exact error message? So we know the exact problem that the Dynatrace plugin detected.
You can also create a support ticket and the support team will help you troubleshoot the error message.