dialogflow / dialogflow-android-client

Android SDK for Dialogflow
https://dialogflow.com
Apache License 2.0
575 stars 270 forks source link

Error: java.lang.NoClassDefFoundError: org.apache.commons.io.Charsets #16

Closed ghost closed 8 years ago

ghost commented 8 years ago

I did add commons-io:commons-io:20030203.000550 dependency and still getting these errors... Heres the error log....

java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841) Caused by: java.lang.NoClassDefFoundError: org.apache.commons.io.Charsets at ai.api.AIDataService.doTextRequest(AIDataService.java:342) at ai.api.AIDataService.request(AIDataService.java:125) at ai.api.services.GoogleRecognitionServiceImpl$1.doInBackground(GoogleRecognitionServiceImpl.java:147) at ai.api.services.GoogleRecognitionServiceImpl$1.doInBackground(GoogleRecognitionServiceImpl.java:139) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237)

xVir commented 8 years ago

Hi, @oloer2014 Please try to add dependency:

compile 'commons-io:commons-io:2.4'

like here https://github.com/api-ai/api-ai-android-sdk/blob/master/apiAISampleApp/build.gradle#L35

ghost commented 8 years ago

I usually search the dependencies for the latest one. I guess only 2.4 works here! Thanks!!