我正在尝试使用 RomainGuy 的 ViewServer (https://github.com/romainguy/ViewServer https://github.com/romainguy/ViewServer)我的 Android Studio 项目使用 Gradle,但我无法让它工作。
我的理解是在项目根目录(“libraries”)中添加一个文件夹,将 ViewServer 目录放入其中(不是完整的ViewServer
目录但实际的库viewserver
文件夹内ViewServer
,并在settings.gradle中引用它
include ':VendorSearch'
include ':libraries:ViewServer'
也在我的 build.gradle 文件中
compile project(":libraries:ViewServer")
当我这样做时,我收到一条消息说
Could not find any version that matches com.android.tools.build.gradle:0.5.+
然后我尝试手动更新 ViewServer 中的 build.gradle 以使用最新的构建工具(发布时为 0.7.+),但我在新的 gradle 版本中遇到了相同的错误。
任何有关如何包含非 jar 第三方库的帮助和一般说明将不胜感激!
您可能需要添加存储库。改变gradle.build
from:
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
android {
compileSdkVersion 18
buildToolsVersion '18.0.1'
}
to
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
apply plugin: 'android-library'
android {
compileSdkVersion 18
buildToolsVersion '18.0.1'
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)