ERROR: Could not determine artifacts for androidx.cardview:cardview:1.0.0: No cached version available for offline mode

Viewed 3003

I want to make an implementation of the library of card-view and library of recycleview but the following error shows up after building or syncing the project:

ERROR: Could not determine artifacts for androidx.cardview:cardview:1.0.0: No cached version available for offline mode

What steps do I need to take to eliminate this sync error?

2 Answers

As answered by @SaadAakash I didn't find any offline work check box under Gradle in Android Studio Preference in my Mac.

After searching for a while I found another way to switch off offline work

Go to View menu in toolbar and navigate to Tool Windows and select Gradle enter image description here

Gradle pane will open in right side, toggle offline work switch enter image description here

and sync the Gradle once again.

Hope it should work!

Go to the following path in your Android Studio:

File > Settings > Build, Execution, Deployment > Gradle

Then under Global Gradle Settings, uncheck the Offline work option. Hit Apply and then Okay. Sync the project again, make sure you have Internet Connectivity and it should work.

Related