android studio 关联库,在Androidstudio中添加外部库

本文讲述了在Android Studio中尝试导入Foursquare Android OAuth库时遇到的问题,包括GradleSync失败和找不到依赖。作者探讨了通过Maven添加库的方法,并提供了可能的替代方案如源码引入和创建JAR包,以及清单合并失败的解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在Androidstudio中添加外部库

我想添加外部库https:/github.com/Foursquare/Foursquare-Android-OAuth对于我的Android应用程序(我使用AndroidStudio,lib Author for Eclipse提供的说明不适用于AndroidStudio)。

我尝试用maven来完成它,所以在File->ProjectStructure->Dependations中,我添加了com.foursquare:foursquare-android-nativeoauth-lib:1.0.0但是Gradle Sync失败了:Error:Failed to find: com.foursquare:foursquare-android-nativeoauth-lib:1.0.0

当我试图构建我的应用程序时(不修复上面的错误,因为我不知道怎么做),我得到了:Error:A problem occurred configuring project ':app'.> Could not resolve all dependencies for configuration ':app:_debugCompile'.> Could not resolve com.foursquare:foursquare-android-nativeoauth-lib:1.0.0.

Required by:

ForSquaresOnly:app:unspecified   > Could not parse POM http://jcenter.bintray.com/com/foursquare/foursquare-android-nativeoauth-lib/1.0.0/foursquare-android-nativeoauth-lib-1.0.0.pom

> Could not find any version that matches com.foursquare:parent:1.0.0.

还有其他方法来导入这个库吗?我可以简单地将源代码复制到我的源代码中,或者用它创建JAR?

顺便说一句:如果遇到问题,请看这个问题(我在导入之后遇到了这个问题):清单合并失败:使用-sdk:minSdkVersion 14

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值