Android Studio - Failed to load artifact

I am new to Android Studio IDE. I created a sample project using Android Studio, and when I tried to create it, it has the following error.

Error:A problem occurred configuring root project 'SampleApp".
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not download artifact 'org.bouncycastle:bcprov-jdk15on:1.48:bcprov-jdk15on.jar': No     
     cached version available for offline mode

Can anyone understand what I did wrong.

+4
source share
2 answers

He needs to download this library to make your build, but you (possibly inadvertently) put Android Studio offline. To fix this, go to "Settings"> Gradle and make sure the "Offline" checkbox is not selected.

+8
source

I think you should add the following code at the top level of your build.gradle:

repositories {
   mavenCentral()}

--refresh-dependencies. .

+4

All Articles