Comments (14)
@zuxie Looks like you're also missing some of the other (transitive) dependencies, like the API AI models lib. Check out the readme.md file on this repo:
https://github.com/api-ai/apiai-android-client/blob/master/README.md
You need to also add
compile 'ai.api:libai:1.4.8'
compile 'com.google.code.gson:gson:2.3.1'
compile 'commons-io:commons-io:2.4'
You should be fine with newer versions of gson (eg. gson v 2.7)
Correct me if I'm wrong, but I think when you have an aar dependency, it doesn't include the transitive dependencies. You have to explicitly include them or force the dependency to be transitive (as long as there's a pom file or similar also published).
from dialogflow-android-client.
@meetferoz
usa o compile 'ai.api:libai:1.6.12' ao invés do compile 'ai.api:libai-base:1.6.12'.
Pra mim funcionou.
from dialogflow-android-client.
did you add the dependency : compile 'ai.api:sdk:2.0.4@aar' ?
if not , do so in your app-level build.gradle
that should solve it
from dialogflow-android-client.
@AniFichadia Thank you so much! That fixed the issue. For those who have the same problem, make sure to follow the format shown in the example, make sure to include the packagingOptions { exclude 'META-INF/LICENSE.txt' exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' exclude 'META-INF/NOTICE.txt' exclude 'LICENSE.txt' }
part.
Now the app crashes when I click on the listen button, displaying java.lang.NoClassDefFoundError. Does anyone have a fix for this issue?
from dialogflow-android-client.
Hi, i did all the above but i still get Error:(8, 20) error: package ai.api.model does not exist
what could be the issue?
here is my build.gradle (module app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.feroz.testapp1"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'LICENSE.txt'
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'ai.api:sdk:2.0.7@aar'
compile 'com.google.code.gson:gson:2.8.1'
compile 'commons-io:commons-io:20030203.000550'
compile 'ai.api:libai-base:1.6.12'
}
from dialogflow-android-client.
Same problem here, please help!
from dialogflow-android-client.
Try Re-syncing gradle or invalidating your caches and restarting Android Studio. If that doesn't work, please post your build.gradle files (module and project). You may not have the correct repositories setup in your project build.gradle (the API AI libs are published on maven central not jcenter) file or there's some other dependency resolution issue
from dialogflow-android-client.
can someone give more insights on this issue? I've tried adding 'ai.api:sdk:2.0.4@aar' dependency as well as using maven central. This is my project build.gradle and app build.gradle
from dialogflow-android-client.
Hello
I'm trying to add dependency of ai.api to https://github.com/Kitt-AI/snowboy project.
when I try to add all dependency I get Failed to resolve :ai.api:libai-base:1.4.8 and other dependency
this is my build.gradle
apply plugin: 'com.android.application'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}
}
android {
signingConfigs {
}
compileSdkVersion 25'
buildToolsVersion '25.0.0'
compileOptions.encoding = 'ISO-8859-1'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
buildTypes {
release {
}
}
defaultConfig {
}
productFlavors {
}
externalNativeBuild {
ndkBuild {
path '../../../../../../Tools/example-wiringPi/jni/Android.mk'
}
}
}
dependencies {
compile 'ai.api:libai-base:1.4.8'
}
please help
thank you
from dialogflow-android-client.
for somebody who has the same issue I had:
I fix this issue by adding this:
repositories {
mavenCentral()
}
and later on added this:
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'LICENSE.txt'
}
for this issue:
Error:Execution failed for task ':transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
File1: /Users/imanyazdansepas/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.2/d7ef6ad7ff0711dd12fe409d62d72d6ed14516e0/log4j-api-2.2.jar
File2: /Users/imanyazdansepas/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.2/c707664e020218f8529b9a5e55016ee15f0f82ac/log4j-core-2.2.jar
from dialogflow-android-client.
Please try to use new library version: 2.0.6 instead of 2.0.5
from dialogflow-android-client.
Please tell m how can i add api.ai sdk??tried to import ailib module in my project but gives an error
Error:(5, 0) Could not get unknown property 'ANDROID_BUILD_SDK_VERSION' for project ':ailib' of type org.gradle.api.Project.
from dialogflow-android-client.
vlw cara, apenas essa linha solucionou o problema. Tinha feito um monte de coisae nada solucionou. vlwwww!!!
from dialogflow-android-client.
Me too had the same. Please help to fix, i'm using android studio 3.0 and kotlin here is my build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.balajip.riya"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'LICENSE.txt'
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'ai.api:sdk:2.0.7@aar'
compile 'com.google.code.gson:gson:2.8.2'
compile 'commons-io:commons-io:2.4'
compile 'ai.api:libai-base:1.6.12'
}
from dialogflow-android-client.
Related Issues (20)
- sending payload from V1 SDK HOT 1
- AIButton fails to initialize after following instructions in Integration.md
- TTS HOT 3
- end_conversation
- On account of using Hindi in DialogFlow
- voice rocoginition took same text in multiple time
- Quick Reply
- Hii Any client for v2 for android HOT 1
- HttpClient cannot be used in the same project with dialogflow HOT 1
- Mic button is not working in android with web demo integration HOT 1
- How to migrate to Dialogflow API V2 and the v2 client library for android client? HOT 11
- Can not getting card or images?
- How to send recorded audio in AIService or get record audio through AIListener of dialogflow android
- URLs to be allowed when using dialogflow-android in restricted network. . . HOT 1
- Raw JSON is there in the console but not getting response in the console nor device
- Language support
- AIService Error
- Intent fulfillments HOT 2
- Authorization failed. Please check your access keys. Error Issues
- Hindi not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dialogflow-android-client.