Skip to main content

Android Studio error

error: package android.support.v4.content does not exist

This is a problem with plugins using old Android support dependencies instead of the AndroidX equivalent.  As it's a dependency issue, to resolve add jetifier.  I know yet another package...

npm install jetifier
npx jetify
npx cap sync

 

Tools

Ionic CLI                     : 6.20.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.2.0
   @angular-devkit/build-angular : 14.1.0
   @angular-devkit/schematics    : 14.1.0
   @angular/cli                  : 14.1.0
   @ionic/angular-toolkit        : 7.0.0

Capacitor:

   Capacitor CLI      : 4.0.1
   @capacitor/android : 4.0.1
   @capacitor/core    : 4.0.1
   @capacitor/ios     : 4.0.1

Cordova:

   Cordova CLI       : 11.0.0
   Cordova Platforms : android 11.0.0, ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 6 other plugins)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.6.0

System:

   ios-deploy : 1.12.0
   ios-sim    : 8.0.2
   NodeJS     : v18.7.0 (/usr/local/Cellar/node/18.7.0/bin/node)
   npm        : 8.15.0
   OS         : macOS Big Sur
   Xcode      : Xcode 13.2.1 Build version 13C100

 

Related articles

Andrew Fletcher16 Aug 2022

How to handle a lost KeyStore password in Android?

If you have a situation where either you have forgotten a Keystore password or change of developers and the password wasn't sent across.... what to do?  However, your app lives on and needs to be updated!   Possible solutions grade.properties This is a great starting point....
Andrew Fletcher08 Aug 2022

How to update package.json dependencies to the latest version?

This article works through the steps to update dependencies in package.json file to the latest version. Use npm-check-updates or npm outdated to suggest the latest versions. npm-check-updates is a utility that automatically adjusts a package.json with the latest version of all...