Search code examples
androidionic4capacitor

Ionic 4 capacitor video player plugin not found by mainActivity


I am trying to use the capacitor video player plugin found here for my android project.

https://github.com/jepiqueau/ionic-capacitor-video-player

When running on google chrome it works as desired. However when attempting to run the project on the android emulator on android studio, I run into problems on MainActivity.java

I am getting the following error "Cannot resolve symbol 'jeep'" in the following line

     import com.jeep.plugin.capacitor.videoplayer.CapacitorVideoPlayer;

I have installed the jeep file, but for reasons unknown to me it cannot find the file.

   npm install --save capacitor-video-player@latest

I have tried moving the 'jeep' folder around, so mainActivity can resolve the folder, but that leads to more errors down the line, with CapacitorVideoPlayer.java. I feel I am clearly missing a step in the process.


Solution

  • You have to run npx cap update after installing the plugin.

    That makes some changes in the native project so it's able to detect the newly installed plugin.