无法解析配置 ':app:_debugCompile' Houndify 的所有依赖项
Could not resolve all dependencies for configuration ':app:_debugCompile' Houndify
我正在尝试将 Houndify API 合并到我的项目中。但是我的 gradle 文件无法构建。
我从他们的站点下载了一个示例项目,它运行正常。我正在将该项目 gradle 文件中的代码迁移到我的文件中。
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "edu.drexel.cs.ptn32.pennapps"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
debug {
storeFile file("debug.keystore")
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
repositories {
maven {
// The username and password for this repo is set below
url 'https://houndify.com/maven/'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile ('hound.android:hound-sdk:0.2.15@aar'){
transitive=true
}
compile ('hound.android:phrasespotter:1.4.0'){
transitive=true
}
}
setHoundifyMavenCredentials("user", "pw")
def setHoundifyMavenCredentials(username, password) {
for (repo in repositories) {
if (repo.properties.url.toString().equals("https://houndify.com/maven/")) {
repo.properties.credentials.username = username
repo.properties.credentials.password = password
}
}
}
得知您在将 Houndify SDK 迁移到您的应用程序时遇到问题,我们深表遗憾。为方便起见,我们刚刚取消了 https://houndify.com/maven/ 网站上的密码限制。这意味着您可以从 build.gradle 文件中删除 setHoundifyMavenCredentials() 部分。我建议拉取最新版本的 Houndify 示例应用程序 houndify-sdk-sample-0.2.17.zip 并确保它在您的系统上构建正常,然后您需要做的就是将这些行添加到您的 build.gradle 它应该引入 Houndify 库。
repositories {
maven {
url 'https://houndify.com/maven/'
}
}
dependencies {
compile ('hound.android:hound-sdk:0.2.15@aar'){
transitive=true
}
compile ('hound.android:phrasespotter:1.4.0'){
transitive=true
}
}
最后确保您 Android 构建系统是最新的。
如果您仍然 运行 遇到问题,请告诉我们,感谢您的反馈。 http://www.soundhound.com/contact
我正在尝试将 Houndify API 合并到我的项目中。但是我的 gradle 文件无法构建。
我从他们的站点下载了一个示例项目,它运行正常。我正在将该项目 gradle 文件中的代码迁移到我的文件中。
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "edu.drexel.cs.ptn32.pennapps"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
signingConfigs {
debug {
storeFile file("debug.keystore")
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
repositories {
maven {
// The username and password for this repo is set below
url 'https://houndify.com/maven/'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:design:22.2.1'
compile ('hound.android:hound-sdk:0.2.15@aar'){
transitive=true
}
compile ('hound.android:phrasespotter:1.4.0'){
transitive=true
}
}
setHoundifyMavenCredentials("user", "pw")
def setHoundifyMavenCredentials(username, password) {
for (repo in repositories) {
if (repo.properties.url.toString().equals("https://houndify.com/maven/")) {
repo.properties.credentials.username = username
repo.properties.credentials.password = password
}
}
}
得知您在将 Houndify SDK 迁移到您的应用程序时遇到问题,我们深表遗憾。为方便起见,我们刚刚取消了 https://houndify.com/maven/ 网站上的密码限制。这意味着您可以从 build.gradle 文件中删除 setHoundifyMavenCredentials() 部分。我建议拉取最新版本的 Houndify 示例应用程序 houndify-sdk-sample-0.2.17.zip 并确保它在您的系统上构建正常,然后您需要做的就是将这些行添加到您的 build.gradle 它应该引入 Houndify 库。
repositories {
maven {
url 'https://houndify.com/maven/'
}
}
dependencies {
compile ('hound.android:hound-sdk:0.2.15@aar'){
transitive=true
}
compile ('hound.android:phrasespotter:1.4.0'){
transitive=true
}
}
最后确保您 Android 构建系统是最新的。 如果您仍然 运行 遇到问题,请告诉我们,感谢您的反馈。 http://www.soundhound.com/contact