cordova-plugin-printer icon indicating copy to clipboard operation
cordova-plugin-printer copied to clipboard

Error: "package android.support.v4.content does not exist"

Open ghost opened this issue 3 years ago • 4 comments

This solution worked for me on Ionic 6 with Angular 14.

Please make the commit.

Hi all, please see a commit I've posted to our repo to resolve this: https://github.com/mi-corporation/cordova-plugin-printer/commit/091a9b58eddfa3fe7e2be5702f33d6e8b345f714

This is working for me, but I assume breaks building pre-AndroidX. Would be curious if it works for others.

Originally posted by @cdipierr in https://github.com/katzer/cordova-plugin-printer/issues/283#issuecomment-984091102

ghost avatar Dec 24 '22 15:12 ghost

Could you undo the change and add the following to app/build.gradle

packagingOptions { pickFirst '**' }

it should be added inside android like this

android { packagingOptions { pickFirst '**' }

...... }

bilalsaeed avatar Jan 14 '23 14:01 bilalsaeed

I was getting OS independant path issue and the above hack seemed to resolve the issue.

bilalsaeed avatar Jan 14 '23 14:01 bilalsaeed

Hi,

You can use `https://www.npmjs.com/package/jetifier` to convert it to androidx

use: npx jetifier

hope this will help someone

rahulsharma841990 avatar Mar 18 '23 11:03 rahulsharma841990

This may also help someone.

Open file .\android\gradle.properties

Add this line:

android.enableJetifier=true

Seth-Know avatar Oct 26 '23 17:10 Seth-Know