I am trying to inject the context of the MainActivity into a class I have. I looked at this but it doesn't work for me and I get the following error:
/home/muhammadmehdi/ALL_PROJECTS/memex/memex-app/app/src/main/java/com/memex/MainActivity.java:30: error: cannot find symbol
import com.memex.components.DaggerMainActivityComponent;
^
symbol: class DaggerMainActivityComponent
location: package com.memex.component
This is the code that I wrote in the onCreate method of the MainActivity.java file:
MainActivityComponent mainActivityComponent = DaggerMainActivityComponent.builder()
.mainActivityModule(new MainActivityModule(MainActivity.this))
.build();