码迷,mamicode.com
首页 > 其他好文 > 详细

Error:Attribute “theme” has already been defined

时间:2015-07-21 15:33:22      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

使用Google Map真的不易啊

这个错误在StackOverflow上有很多人问。个人使用的库是:

dependencies {
    compile fileTree(include: [‘*.jar‘], dir: ‘libs‘)
    compile ‘com.google.android.gms:play-services:5.0.77‘
    compile ‘com.android.support:appcompat-v7:22.0.0‘
}

StackOverflow解决的办法还是不少,最主要的办法是重新使用一个可以兼容的库。经过尝试,下面的两个库可以在一起通过编译。

dependencies {
    compile fileTree(include: [‘*.jar‘], dir: ‘libs‘)
    compile ‘com.google.android.gms:play-services:5.0.77‘
    compile ‘com.android.support:appcompat-v7:20.0.0‘
}

这个方案,会要求将targetSdkVersion降到20。

还有一个思路,是升级到最新的库,但是个人没有从网上找到。

Google Map还有个弊端是要求安装app的机器必须有匹配版本的Play Service。很多厂商并没有预装Play Service。如果没有,又需要自己去装。作为一个系统服务,现在碰到的问题老是闪退。

总结,如果不是非常需要Google Map,建议使用其他地图,比如高德,百度。它们的使用要方便很多。没有那么多的依赖。

Error:Attribute “theme” has already been defined

标签:

原文地址:http://my.oschina.net/sulliy/blog/481181

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!