如何在android studio中使用maven [英] How to use maven in android studio

查看:739
本文介绍了如何在android studio中使用maven的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的项目中使用


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>

解决方案

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

这篇关于如何在android studio中使用maven的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆