运行pocketsphinx-android-demo时不支持major.minor版本

时间:2017-10-12 02:30:11

标签: android android-studio pocketsphinx pocketsphinx-android

我想在android

中运行Pocketsphinx demo program

教程告诉我们直接从Github加载项目

  

要在IDE中获取演示,请选择结帐a   从VCS项目中选择GitHub并输入项目URL:   https://github.com/cmusphinx/pocketsphinx-android-demo

我尝试这样做,但发现git.exe丢失了,显然我需要安装其他软件才能直接从Github加载这个项目

我尝试直接从here

的zip文件下载github项目

我解压缩了zip文件并在其中找到了Androidstudio项目文件,但是当我尝试加载此项目时,我发现它无法加载,因为它没有gradle.properties文件

我将另一个正在运行的Androidstudio项目中的gradle.proprties复制到此文件夹中。这是我的gradle.properties文件的内容:

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m  

但是,现在当我加载项目时,我收到此错误:

  

错误:(1,0)原因:com / android / build / gradle / AppPlugin:不支持   major.minor版本52.0

如果我在IDE中双击build.gradle(Project:pocket-sphinx-demo-master),这就是我得到的:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "edu.cmu.sphinx.pocketsphinx"
        minSdkVersion 14
        targetSdkVersion 24
        versionCode 2
        versionName "1.1"
    }
}

dependencies {
    compile project(':aars')
    compile project(':models')
    compile 'com.android.support:appcompat-v7:25.2.0'
}

如何摆脱此错误? pocketphinx演示程序是否预设为仅适用于与我不同的Androidstudio版本?如果是这样,我如何找出哪一个,是否可以将其设置为与我当前的版本一起使用?我不认为这是我的Androidstudio安装的问题,因为我所有的其他Android程序都运行良好

1 个答案:

答案 0 :(得分:0)

您可以更轻松地使用此库(RapidSphinx)。只需将此库添加到您的应用build.gradle,而无需处理Pocketsphinx资产和配置。

相关问题