Ionic Paypal plugin not working in build apk

I am trying to use PayPal plugin in ionic 4, I used the code on the ionic docs followed the steps.
When I ran the application in devapp it successfully opened paypal page and worked fine, but when I built the apk file and ran it in my android device it throws error “plugin_not_installed”.
Here is the code i used for paypal

    this.payPal.init({
      PayPalEnvironmentProduction: 'YOUR_PRODUCTION_CLIENT_ID',
      PayPalEnvironmentSandbox: 'MY_SANDBOX_CLIENT_ID'
    }).then(() => {
      this.payPal.prepareToRender('PayPalEnvironmentSandbox', new PayPalConfiguration({
      })).then(() => {
        // My Code ....        
      }, () => {
        this.presentToast("Prepare to render Error.");
       });
    }, (error) => {
      this.presentToast(JSON.stringify(error));  //This shows error "plugin_not_installed"
    });

Here is my Ionic Info

Ionic:

Ionic CLI : 5.2.1 (C:\Users\nosha\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : none
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 9 other plugins)

Utility:

cordova-res : 0.5.2
native-run : 0.2.7

System:

Android SDK Tools : 26.1.1 (C:\Users\nosha\AppData\Local\Android\Sdk)
NodeJS : v11.6.0 (C:\Program Files\nodejs\node.exe)
npm : 6.5.0-next.0
OS : Windows 10

I fixed this solution, After doing some research i found that the issue was with the comaptibilty of the the paypal plugin and the android version I was building for.
I was building the app for Android 8 , to fix I built the app for Android 7 and that solved the problem for me.