I was able to solve this myself. The issue was with proguard-rules.pro. I was using keep rules for Retrofit, Gson and other crucial libraries but not for Hilt due to which it was having issues. When I added keep rules for Hilt, everything is working correctly.