Flutter Upgrade 2.2.1 - Capacitor.isPluginAvailable('App') is not working only in ANDROID

Hi,

App redirecting to native page not working after upgrading the flutter version from 1.9.1+hotfix.4 to 2.2.1.

Below is the code used in web to call the signout page.

Please suggest me with code reference to call the signout page from Web Page. Thanks in Advance!

Package.Json dependencies

“dependencies”: {

"@capacitor/android": "^2.4.7",

"@capacitor/cli": "^2.4.7",

"@capacitor/core": "^2.4.7",

"@capacitor/ios": "^2.4.7",

"jetifier": "^1.6.5"

}

Here is the React Web Code:

import { mobileAppRoot } from ‘app/config’;

const Capacitor = window.Capacitor;

// Device Status Exports

export const isMobile = Capacitor && Capacitor.isNative && window.location.host === ‘localhost’;

export const isIOS = isMobile && Capacitor.isIOS;

export const isAndroid = isMobile && Capacitor.isAndroid;

// Initialization

let App;

// App

export const openMobileRoute = (url) => {

if (Capacitor.isPluginAvailable(‘App’)) {
App = Capacitor.Plugins.App;
}

if (App) {

App.openUrl({ url: `${mobileAppRoot}${url}` }); // mobileAppRoot = http-internal: url = signout

}

};

This has been fixed by adding below code in build.gradle

buildTypes {
release {
minifyEnabled false
shrinkResources false
}
}