I am trying to run Pocketsphinx demo program in android
The tutorial tells us to load the project from Github directly
In order to obtain the demo in the IDE, please select to checkout a project from VCS, select GitHub and enter the project URL: https://github.com/cmusphinx/pocketsphinx-android-demo.
I tried to do that but found out that git.exe was missing, and apparently I need to install some other software to be able to load this project directly from Github
I tried downloading the github project directly in a zip file from here
I extracted the zip file and found the Androidstudio project files in it, but when I tried to load this project I found that it would not load because it did not have the gradle.properties file
I copied gradle.proprties from another one of my working Androidstudio projects into this folder. This is the content of my gradle.properties file:
# 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
However, now when I load the project I am getting this error:
Error:(1, 0) Cause: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
If I double click on build.gradle (Project: pocket-sphinx-demo-master) in the IDE this is what I get:
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'
}
How do I get rid of this error? Is the pocketsphinx demo program preset to only work with a version of Androidstudio different from what I have? If so, how do I find out which one, and is it possible to set it to work with my current version? I don't think this is a problem with my Androidstudio installation as all my other android programs are working fine
You can try this library with easier usage (RapidSphinx). Just add this library to your app
build.gradlewithout dealing with Pocketsphinx assets and configuration.