OpenFTC / EasyOpenCV

Finally, a straightforward and easy way to use OpenCV on an FTC robot!
213 stars 95 forks source link

Cannot resolve method .getResources() and .getPackageName() #25

Closed GiuliCon closed 3 years ago

GiuliCon commented 3 years ago

I don't know why, but Android Studio doesn't recognize .getResources() and .getPackageName() but this only happens to me, to my buddy, with the exact same project it works perfectly fine. Here's the code:

int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier("cameraMonitorViewId", "id", hardwareMap.appContext.getPackageName());
Windwoes commented 3 years ago

This is most certainly an issue with your Android Studio configuration, not with EasyOpenCV

Windwoes commented 3 years ago

Have you tried "Invalidate Caches and Restart" in Android Studio?