0

I have an Android Project with gradle config like that:

MainApp: -dependOn-> Module T

MainApp: -dependOn-> Module C

Module C: -dependOn-> Module T

Now, I don't need Module T anymore in MainApp, so I remove it from MainApp, but when I build the project, I throw error because some class of Module C that extends from Module T can't be recognized in MainApp.

Can you help me how to remove Module T from MainApp

1 Answers1

0

Use api instead of implementation for Module T dependency in Module C build.gradle file

shmakova
  • 6,076
  • 3
  • 28
  • 44
  • `api` would make dependency of module T available for MainApp in compile time. It's not good for build speed – Trương Khánh Apr 12 '21 at 11:03
  • The reason that I removed Module T from MainApp is: Past: `Module T` has class `SuperImageView`. `MainApp` use `SuperImageView`. `Module C` has class `ZoomableImageView` extends `SuperImageView`. Now: I don't want to use `SuperImageView` in MainApp anymore, so I removed it. But, when project is compiled, MainApp can't find the file `SuperImageView` so it throw Exception at build time. – Trương Khánh Apr 12 '21 at 11:04
  • Maybe you forgot to remove SuperImageView from your xml files @TrươngKhánh – shmakova Apr 12 '21 at 11:24