error 24 13 android studio faild to resolve
<p>I want add a library to my project in Android Studio, but it gave me this error no matter what my library is. I always get this error when I want to add a library:</p>

<pre><code>Error:(24, 13) Failed to resolve: com.squareup.retrofit2:retrofit:2.1.0
</code></pre>

<p><br><br>
    <a href="https://i.stack.imgur.com/O7xJf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O7xJf.jpg" alt="enter image description here"></a></p>

<p>Do I have to sync the project in online mode to add a library? I sync project online work but sync never be ended.</p>