It can be tricky sometimes when adding an android library project in intellij or android studio. The reasons may vary from time to time but two I recently encountered are:
- Automatic update of project.properties is disabled in intellij, thus the android library project cannot be added.
- Creating a new library module in android studio, for an ant based project, Studio only creates a settings.gradle, but forget to change the project.properties.
So far, the root cause is clear, the inconsistency between ide settings and android configs.
- You can manually update project.properties to a correct value
- Remember to update settings in your IDE