2017-08-08 76 views
-2

我研究了如何添加我在GitHub中下载的库。添加库时出错

这是我在GitHub上下载的文件(.zip格式):https://github.com/googlemaps/android-maps-utils

这是我看了教程: “https://www.youtube.com/watch?v=1MyBO9z7ojk

显示在我的Android Studio时的错误同步gradle构建。

Error:Project :app declares a dependency from configuration 'compile' to configuration 'default' which is not declared in the descriptor for project :Libraries:android-maps-utils-master.

+0

发布您的build.gradle – MinnuKaAnae

回答

0

您不需要下载它。它在Maven中心。将它作为依赖项添加到您的build.gradle文件中,例如

compile 'com.google.maps.android:android-maps-utils:0.5' 
+0

如果离线,您还可以运行吗?因为我的网络不一致 –

+0

@YaZaoRuZakiaga一旦下载它不会重新下载它。 –

+0

并非所有(几乎都不是)github库托管在maven中心。 –