3

I have 1 app with 2 module

MyApp -> Framework -> Module

MyApp

implementation project(':Framework')

Framework

 implementation project(':MyModule')

But I can't use MyModule's files in MyApp. IDE show me "cannot access" error where I want to extend the class witch extend a MyModule class. And it not founds the classes from MyModule Anyone have idea about this? What's wrong?

Nabin Bhandari
  • 15,949
  • 6
  • 45
  • 59
vihkat
  • 895
  • 3
  • 13
  • 28

1 Answers1

2

Use api instead of implementation (in the middle module) if you want to provide access to the modules which are using it.

In your case, in the module Framework, use:

api project(':MyModule')
Nabin Bhandari
  • 15,949
  • 6
  • 45
  • 59
  • Read more: https://stackoverflow.com/questions/44413952/gradle-implementation-vs-api-configuration – vihkat Sep 20 '18 at 08:42