NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/Platform

Solution 1:

I guess, the problem is here:

compile 'com.squareup.okhttp3:logging-interceptor:3.3.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'

Try to make that:

compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'

Solution 2:

Here is the issue https://github.com/square/retrofit/issues/2266

You have to put the same version. This is the last version

implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'
implementation 'com.squareup.okhttp3:okhttp:4.7.2'