Bare bones android app crashes at ParticleCloudSDK.init(this)

I have been trying to update my very old Android App to use the latest SDK and the latest version of Android Studio. A lot has changed since the last time I tried to build my app. After some build failures I decided to start from scratch with a new project.

Unfortunately, this new app crashes early at ParticleCloudSDK.init(this) with the error:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/okhttp/HttpUrl;

To fix this, I tried adding: implementation ‘com.squareup.okhttp3:okhttp:4.1.0’ to the dependencies list of the project, but to no avail. If I open up I see this at line 48:
doInit(ctx, oauthProvider, HttpUrl.parse(asString));

It is unable to resolve the reference to HttpUrl().

Any help is appreciated.