Android Studio library “error: package does not exist”

For Android Studio 2.2.2

Yes, in library module, it can’t use the apply plugin: com.android.application statement in the module definition, yes, use apply plugin: com.android.library instead. (still in lib module)

But then you have to do the following:

  1. Expose the same SDK versions in Gradle files for both modules.
  2. Right click on your projects “app” module folder and click on -> open module settings
  3. Click on the “dependencies” tab
  4. Click on the + sign to add a new dependency and select “Module Dependency”
  5. Look for the library you need and add it.

Also while naming your lib module avoid capitals.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)