我想将外部库https://github.com/foursquare/foursquare-android-oauth添加到我的Android应用中(我使用的是Android Studio,库作者提供给Eclipse的说明在Android Studio中不起作用)。
我尝试使用Maven来完成这个操作,在“文件”->“项目结构”->“依赖关系”中添加了com.foursquare:foursquare-android-nativeoauth-lib:1.0.0
,但Gradle同步失败:
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文件?
顺便说一下:如果你在导入后遇到问题,请参考这个问题(我在导入后遇到了这个问题):Manifest merger failed : uses-sdk:minSdkVersion 14