Android studio - empty activity won't sync - java.lang.NoClassDefFoundError: org/apache/http/HttpRequest

20 Views Asked by At

I get the same error trying to compile sample code from github. It's a new installation of Android studio Iguana 2023.2.1.

compileSdk = 34 minSdk = 24

I tried "Invalidate caches" and restarted Android Studio. As far as I understand HttpRequest has been deprecated for a long time so I don't understand why it's looking for it.

1

There are 1 best solutions below

0
JFBonzo On

Fixed it by uninstalling Android Studio, deleting appropriate directories under AppData, and reinstalling.