To resolve this I used Objdetect's getPredefinedDictionary method as shown below:
for the import:
import org.opencv.objdetect.Objdetect;
And for the usage in code:
Dictionary dictionary = Objdetect.getPredefinedDictionary(Objdetect.DICT_4X4_50);