使用Android的地图-utils的在Android的工作室 [英] Use android-maps-utils in Android Studio

查看:130
本文介绍了使用Android的地图-utils的在Android的工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用这个库[1]在Android项目或者与Android Studio或与ADT。不过,这并不在所有的工作。在ADT我不知道如何处理摇篮的东西和Android的工作室,当我尝试导入项目,我得到错误找不到com.google.android.gms:玩-服务:3.1.36。

I am trying to use this library [1] in an Android project either with Android Studio or with ADT. But it doesn't work at all. In ADT I don't know how to handle gradle stuff and in Android Studio, when I try to "Import Project", I get the error "Could not find com.google.android.gms:play-services:3.1.36.

(没有足够的信誉来发布的图片,它是在imgur与xswZ3.jpg)

(don't have enough reputation to post picture, it's on imgur with xswZ3.jpg)

我不熟悉的摇篮,我只能是做什么的一个模糊的概念,但我要的是使用类似BubbleIconFactory F =新BubbleIconFactory(这)在我自己的项目。

I am not familiar with gradle and I only have a vague idea of what it does but all I want is to use something like BubbleIconFactory f = new BubbleIconFactory(this) in my own project.

任何帮助是AP preciated!

Any help is appreciated!

[1] https://github.com/googlemaps/android-maps-utils

推荐答案

也许你的问题是需要在之外 buildscript 块。

Perhaps your problem is needing the repositories outside of the buildscript block.

内部的 buildscript 是管理的摇篮依赖本身,我相信。以下是我解决我的问题与谷歌地图-utils的作为库的依赖。希望这有助于。我包括我的地图,支持-V4库了。

The repositories internal to the buildscript is for managing the gradle dependency itself, I believe. Here's how I resolved my problem with google-maps-utils as a library dependency. Hopefully this helps. I included my maps and support-v4 libs too.

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:0.10+'
    }
}

apply plugin: 'android'

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    // Support Libraries
    compile 'com.google.android.gms:play-services:4.1.32'
    compile 'com.android.support:support-v4:19.0.1'
    compile 'com.google.maps.android:android-maps-utils:0.3+'
}

这篇关于使用Android的地图-utils的在Android的工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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