Java Spring: The import com.azure cannot be resolved but still runs, then half the time throws

In my build.gradle:

implementation 'com.azure:azure-communication-sms:1.1.18'

In my code:

import com.azure.communication.sms.*;

No matter what I refresh, clean, build, restart, in STS com.azure is always highlighted with: “The import com.azure cannot be resolved”

When I actually run it and Proceed with launch even though errors exist, it actually works half the time. The other half though it throws: java.lang.Error: Unresolved compilation problems: SmsClient cannot be resolved to a type

  • Try deleting your .gradle folder. This definitely seems like some sort of weird cache issue.

    – 

Leave a Comment