Unable to find source java class while developing plugin for cordova (Android)

A 'Clean Project' from the Android Studio 'Build' dropdown fixed this for me.


Deleting the .idea and .gradle folders worked for me.

Next time you launch open the project folder in Android Studio it should recreate them.

However it then gives me the Android Studio: "Please select Android SDK" dialog.

Fix for me is: File -> Project Structure -> (modules)App -> BuildToolsVersion -> ... and then (bizarrely) click to open the pulldown and click on the exact same item that was already selected.

And then rebuild.

Sort it out, Google!

(Android Studio 3.1.2)


I am not using any special IDE (yes I live under a rock)

cordova clean

works for me