I’m running into this exact same issue. The errors are happening in the capacitor-android module itself. I upgraded “manually”, by updating all @capacitor
-related dependencies.
For me, the issue was that I overlooked the @capacitor/cli
dependency. After I updated that dependency to ~4.2.0
, and then deleted the /android
folder (rm -rf android
), and re-added it (npx cap add android
) it works!
Current capacitor dependencies for my project:
"dependencies": {
//...
"@capacitor/android": "~4.2.0",
"@capacitor/app": "~4.0.1",
"@capacitor/browser": "~4.0.1",
"@capacitor/core": "~4.2.0",
"@capacitor/haptics": "~4.0.1",
"@capacitor/ios": "~4.2.0",
"@capacitor/keyboard": "~4.0.1",
"@capacitor/status-bar": "~4.0.1"
// ...
},
"devDependencies": {
// ...
"@capacitor/cli": "4.2.0",
"@ionic/angular-toolkit": "^7.0.0",
"@ionic/cli": "^6.20.1",
}