java.lang.IllegalStateException: Dex archives: setting .DEX extension only for .CLASS files

Shell
./gradlew clean

#or for cordova developers
cordova clean
Source

Also in Shell: