How to update an imported module in Android Studio?

OK I found the answer by myself:

You must not add the external library as an existing module. It will make a copy of it under your project folder.

What you have to do is:

  1. Delete the library folder in your current project. (You can also delete the ./idea/modules/[module_name] folder.)
  2. Open the setting.gradle file and add these:
include ':your_external_library_module_name'
project (':your_external_library_module_name').projectDir = new File('../path/to/your/external/library')

include ':perhaps_second_external_library'
project (':perhaps_second_external_library').projectDir = new File('../path/to/your/second/external/library')
  1. In your build.gradle (:app) file add dependency as:
dependencies {
    implementation project(':your_external_library_module_name')
    implementation project(':perhaps_second_external_library')
}
  1. Sync the project and you are done.

Leave a Comment

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