Я пытаюсь использовать pocketsphinx в своем приложении для Android, и это доставляет мне неприятности.Я установил его, как показано здесь: PocketSphinx на Android , в частности, путем импорта .aar.Вот мой код:
файл проекта build.gradle:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:3.2.1'
classpath 'com.android.tools.build:gradle:3.2.1'
//classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
Файл приложения build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "kutz.connor.Aware"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
DexOptions {
matchingFallbacks = ['debug', 'release']
}
}
}
dependencies {
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.maps.android:android-maps-utils:0.5+'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.0.1'
implementation 'org.tensorflow:tensorflow-lite:+'
implementation project(':aars')
}
apply plugin: 'com.google.gms.google-services'
И полученная ошибка
ERROR: Unable to resolve dependency for ':Aware@debug/compileClasspath': Could not resolve project :aars.
ERROR: Unable to resolve dependency for ':Aware@debugAndroidTest/compileClasspath': Could not resolve project :aars.
ERROR: Unable to resolve dependency for ':Aware@debugUnitTest/compileClasspath': Could not resolve project :aars.
когда я пытаюсь построить проект.После исследования я увидел, что это, вероятно, связано с обновлением Androdi Studio до 3.0.
Некоторые решения, которые я пробовал :
Добавление соответствующих откатов для отладки, релиз в функции build.gradle
Создание настройки settings.gradle для проекта
Любая помощь будет отличной.Я видел в постах также перемещение всех типов сборок в приложение, но я не уверен, как именно это сделать.
РЕДАКТИРОВАТЬ
Здесь находится файл settings.gradle в папке проекта, он имеет только одну строку
include ':Aware', ':aars'