..../cordova/sms_receiver/SmsReceiverPlugin.java:8: error: package android.support.v4.app does not exist import android.support.v4.content.ContextCompat;
also:
..../cordova/sms_receiver/SmsReceiverPlugin.java:121: error: cannot find symbol ActivityCompat.requestPermissions(this.cordova.getActivity(), new String[]{type}, requestCode);
and:
..../cordova/sms_receiver/SmsReceiver.java uses or overrides a deprecated API.
Driving me nuts. Trying to build a cordova app for android. I've followed a ton of different google results to try and get rid of this error.
Including adding this to plugin.xml:
<framework src="com.android.support:support-v4:+" />
also a reference to a build.gradle file with:
dependencies: {
compile 'com.android.support:support-v4:+'
}
Also adding numerous paths to $PATH, selecting everything in Android SDK manager etc etc, nothing works!
New to this I'll admit, this is on a Mac with Java 1.8 JDK installed. Tried 10.0 also.
I've lost track of all the things I've tried. Please can someone put me out of my misery.
You can probably solve your issue by adding the plugin :
https://www.npmjs.com/package/cordova-plugin-android-support-v4
as mentioned here - https://github.com/rehy/cordova-plugin-sms-receiver/issues/7
Change and import
androidx.core.content.FileProvider;
Otherwise
npm install jetifier
npx jetify
npx cap sync android
if your project on native
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With