dialogflow-android-client icon indicating copy to clipboard operation
dialogflow-android-client copied to clipboard

App crashes on startup with NoClassDefFound error

Open zuxie opened this issue 8 years ago • 9 comments
trafficstars

Hi everyone! I'm currently trying to implement AI.API by following the provided tutorial. When I try to get the app run on the emulator, it crashes upon startup with the following error. screen shot 2017-06-22 at 3 44 11 pm

I noticed the error has to do with something on line 35 of my code, but I'm simply following the tutorial and not sure what is the issue (token was erased from the code below for confidential purposes). screen shot 2017-06-22 at 3 46 34 pm

I also tried to use the provided sample app but the same error occurred. I would be really appreciated if someone could provide me with some insights! Thank you so much in advance!

zuxie avatar Jun 22 '17 07:06 zuxie

@Aashit-Sharma I deleted my token to post my code on GitHub.

zuxie avatar Jun 22 '17 11:06 zuxie

Lol sorry for being a doofus. Looks like you're calling an undefined class. Have you added all the correct dependencies to the grade build?

Aashit-Sharma avatar Jun 22 '17 12:06 Aashit-Sharma

@Aashit-Sharma Yes. I included all the dependencies. screen shot 2017-06-22 at 9 40 58 pm

zuxie avatar Jun 22 '17 13:06 zuxie

Try to add log4j into dependency list

compile group: 'log4j', name: 'log4j', version: '1.2.17'

folomeev avatar Jun 22 '17 14:06 folomeev

@folomeev it still gives the same error message.

zuxie avatar Jun 22 '17 14:06 zuxie

well, it means that following import should be used instead:

compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.8.2'

folomeev avatar Jun 22 '17 14:06 folomeev

@folomeev Now the following error occurs: screen shot 2017-06-22 at 11 39 03 pm screen shot 2017-06-23 at 12 35 33 am Sorry for all the troubles. I'm new to android programming so I'm not sure how everything works.

zuxie avatar Jun 22 '17 16:06 zuxie

What are you trying to make? For a simple example, you shouldn't be having any problems in script manager.

It would be a good idea to restart afresh.

Aashit-Sharma avatar Jun 22 '17 16:06 Aashit-Sharma

This issue is duplicate of issue #34 but manifests as a crash on android O

tao1 avatar Jun 26 '17 14:06 tao1