【问题标题】:Unsupported major.minor version while running pocketsphinx-android-demo运行 pocketsphinx-android-demo 时不支持的 major.minor 版本
【发布时间】:2017-10-12 02:30:11
【问题描述】:

我正在尝试在 android 中运行 Pocketsphinx demo program

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

为了在IDE中获取demo,请选择checkout a 来自 VCS 的项目,选择 GitHub 并输入项目 URL: https://github.com/cmusphinx/pocketsphinx-android-demo

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

我尝试直接从here 下载 github 项目的 zip 文件

我解压了zip文件,发现里面有Androidstudio项目文件,但是当我尝试加载这个项目时却发现它无法加载,因为它没有gradle.properties文件

我将gradle.proprties 从我的另一个正在工作的 Androidstudio 项目中复制到此文件夹中。这是我的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 : Unsupported major.minor 版本 52.0

如果我在 IDE 中双击 build.gradle(项目: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'
}

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

【问题讨论】:

标签: android android-studio pocketsphinx pocketsphinx-android


【解决方案1】:

你可以试试这个更容易使用的库 (RapidSphinx)。只需将此库添加到您的应用程序build.gradle,而无需处理 Pocketsphinx 资产和配置。

【讨论】:

    猜你喜欢
    • 2020-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-28
    • 2017-12-09
    • 1970-01-01
    • 1970-01-01
    • 2010-12-04
    相关资源
    最近更新 更多