javaandroidimportcordova-pluginsvisual-studio-cordova

How to enable auto imports while creating Cordova Plugin


i am currently developing cordova plugin in Java. I am wondering about turning on auto import with a shortcut like alt+enter to import. I was searching for plugins for it for vs code and android studio but i didn't find anything working. Is there a way to use some IDE supporting auto imports for cordova plugin and android at one time?

I am confused because some imports look like this: import org.apache.cordova.CallbackContext; import org.apache.cordova.PermissionHelper;

Another imports look like this: import android.content.BroadcastReceiver; import android.content.Context;

Android docs are quite huge so i can find info about imports and functions but cordova docs are not enough to know what is going on. Any tips how to easily learn cordova plugins? Big thanks for responses, have a nice day!


Solution

  • I opened my project in Android Studio in the certain way and it works. So it s important to open in Android Studio your cordova app from the path: yourCordovaApp/platforms/android/app.

    U need to solve gradle problems if it appears and all should run properly. Now all the hints are displaying for me good.