No Java files found which extend CordovaActivity. when use "cordova build"

Solution 1:

I had the same error when I cloned my repository from another project. I solved it by removing the platforms and adding it again.

remove : cordova platform rm android
add : cordova platform add android

Solution 2:

All you need to do is remove platform cordova platform rm android and re-add platform by typing cordova platform add android, and the error goes away

Solution 3:

In Eclipse or another editor, go into the .java source file under platforms/android/src/ and make sure the class extends CordovaActivity (it may have previously extended DroidGap instead).