Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot connect to jcenter() in android studio

I'm trying to import MusicBobber library in android studio. I had download and import the example project but when I sync the project this error showed up:

Error:A problem occurred configuring project ':app'.
    A problem occurred configuring project ':audiowidget'.
    Could not download support-media-compat.aar (com.android.support:support-media-compat:24.2.0)
    Could not get resource 'https://jcenter.bintray.com/com/android/support/support-media-compat/24.2.0/support-media-compat-24.2.0.aar'.  
    Could not GET 'https://jcenter.bintray.com/com/android/support/support-media-compat/24.2.0/support-media-compat-24.2.0.aar'.  
    Connection to 'https://jcenter.bintray.com' refused

when I try to open the https://jcenter.bintray.com , site will open with no problem. also I'm using freegate for proxy. where is the problem and what should I do?

like image 824
Shima Erfan Avatar asked Aug 29 '16 08:08

Shima Erfan


People also ask

What can I use instead of JCenter?

Migrating your app away from JCenter can be done by replacing all jcenter() references with mavenCentral() and adding explicit inclusions for dependencies that haven't migrated yet. For your published libraries, try to migrate as soon as possible, and don't forget to also migrate all existing artifacts.

What does JCenter () do?

JCenter is a central repository on JFrog Bintray platform for finding and sharing popular JVM language packages in Maven format, used by Maven, Gradle, Ivy, SBT, and others. JCenter is the most comprehensive source for OSS Maven packages, hosting over 340,000 public packages.

Is JCenter shut down?

JCenter will no longer be available for non-Artifactory clients. This means by the end of March 2021, publishing new packages to Bintray will no longer be allowed. Existing packages can still be downloaded until February 1st 2022.


Video Answer


1 Answers

In Android Studio, go to

File> Settings...> Appearance & Behavior> System Settings> HTTP Proxy

then choose Auto-detect proxy settings

finally Synchronize your project.

Note:

Make sure your SDK and Android Studio and gradle are update. I run the project successfully with these system's configurations:

  • Android Studio 2.1.3
  • gradle-2.14.1
  • SDK:
  • Android Support Repository 32
  • Google Play services 32
  • Android Repository 32
like image 78
Iman Irajian Avatar answered Oct 23 '22 19:10

Iman Irajian