导入库给出的Andr​​oid Studio错误 [英] Importing library gives error in Android studio

查看:226
本文介绍了导入库给出的Andr​​oid Studio错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的 Android的工作室。我试图使用 Android的地图-utils的图书馆工作。但它给我下面的错误。

 `错误:发生(64)的一个问题评估项目:图书馆。
  >没有这样的属性:sonatypeUsername类:org.gradle.api.internal.project.DefaultProject_Decorated`

谁能帮我这个问题,并告诉我一个简单的方法来导入库在Android Studio中?


解决方案

我有一个类似的问题,而我是从日食迁移。我通过使用包括图书馆(而不是导入它作为一个模块,并使用它作为一个依赖)的方法的gradle解决了我的问题。


  

添加以下依赖你的摇篮构建文件:

  {相关性
    编译com.google.maps.android:android-maps-utils:0.3+
}


来源: http://googlemaps.github.io/android-maps-utils /#启动

I am new to Android Studio. I am trying to work using the android-map-utils library. But it is giving me the following error.

 `Error:(64) A problem occurred evaluating project ':library'.
  > No such property: sonatypeUsername for class: org.gradle.api.internal.project.DefaultProject_Decorated`

Can anyone help me with this issue and also tell me a easy way to import libraries in android studio?

解决方案

I had a similar problem while I was migrating from eclipse. I resolved my issue by using the gradle method of including the library (as opposed to importing it as a module and using it as a dependency).

Add the following dependency to your Gradle build file:

dependencies {
    compile 'com.google.maps.android:android-maps-utils:0.3+'
}

source: http://googlemaps.github.io/android-maps-utils/#start

这篇关于导入库给出的Andr​​oid Studio错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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