Don't forget to update your composer, and update it in the right directory:
composer require mobiledetect/mobiledetectlib
This probably causes this issue, as it can't find the file to load the class.