首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法解决配置“:app:_debugCompile”Houndify的所有依赖项

无法解决配置“:app:_debugCompile”Houndify的所有依赖项
EN

Stack Overflow用户
提问于 2016-01-23 09:40:23
回答 1查看 583关注 0票数 0

我正在尝试将Houndify API集成到我的项目中。但是,我的gradle文件不会生成。

我从他们的网站下载了一个样本项目,它正常工作。我正在将代码从项目分级文件迁移到我的项目中。

代码语言:javascript
复制
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
        }
    }
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-05 19:39:22

很遗憾听说您在将Houndify SDK迁移到您的应用程序时遇到了问题。为了让事情变得更简单,我们刚刚删除了https://houndify.com/maven/网站上的密码限制。这意味着您可以从setHoundifyMavenCredentials文件中删除build.gradle ()部分。我建议拔出Houndify示例应用程序Houndify -sdk-sam-0.2.17.zip的最新版本,并确保它在您的系统上构建良好,然后您所需要做的就是将这些行添加到您的build.gradle中,并且它应该进入Houndify库。

代码语言:javascript
复制
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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34961886

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档