Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use maven in android studio

I want to use bottomBar library in my project. When I add the proper gradle command in the build.gradle file and sync, I get this error:

Failed to resolve: com.roughike:bottom-bar:2.0

I have searched a lot for the reason. A solution is to use jcenter(), but this is not accessible in my country and syncing lasts up to 1 or in some cases two hours. So I use maven instead. In this case how can I use the maven commands recommended on the library home page? Where should I put the following code?

<dependency>
  <groupId>com.roughike</groupId>
  <artifactId>bottom-bar</artifactId>
  <version>2.+</version>
  <type>pom</type>
</dependency>
like image 710
Shima Erfan Avatar asked Nov 09 '22 10:11

Shima Erfan


1 Answers

Gradle

dependencies {
        compile 'com.roughike:bottom-bar:2.+'
}

If error sync gradle run a proxy(Host=127.0.0.1 , proxyPort=8580) and type this command in cmd

gradlew -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8580

enter image description here

like image 72
Ahmad Aghazadeh Avatar answered Nov 14 '22 21:11

Ahmad Aghazadeh