bitpay / cordova-plugin-qrscanner

A fast, energy efficient, highly-configurable QR code scanner for Cordova apps and the browser.
MIT License
567 stars 773 forks source link

Capacitor Error: cannot find symbol import android.support.v4.app.ActivityCompat #360

Open damtaipu opened 2 years ago

damtaipu commented 2 years ago

The plugin is not buiding on the capacitor. pops error: cannot find symbol import android.support.v4.app.ActivityCompat.

Im usage Capacitor 3.0.2

mattbob commented 2 years ago

I'm running into this as well with the cordova qrscanner

  "dependencies": {
    "@capacitor/android": "^3.4.1",
    "@capacitor/cli": "^3.4.1",
    "@capacitor/core": "^3.4.1",
    "cordova-plugin-qrscanner": "^3.0.1",
    ...
JanKoll commented 2 years ago

The problem is that this library is no longer supported. It should be fixed if you include the appropriate AndroidX library like here:

// import android.support.v4.app.ActivityCompat;
import androidx.core.app.ActivityCompat; // <- AndroidX library