Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error When Build error: cannot find symbol import android.support.v4.app.ActivityCompat #155

Open
ryandan29 opened this issue Mar 23, 2023 · 1 comment

Comments

@ryandan29
Copy link

when i install ionic cordova plugin add cordova-plugin-cszbar

and build ionic cordova build android --prod

this is my message error
https://ibb.co/qrnRynp

my ionic info

Ionic:

   Ionic CLI                     : 6.18.2 (C:\Users\R\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 6.4.1
   @angular-devkit/build-angular : 15.0.4
   @angular-devkit/schematics    : 15.0.4
   @angular/cli                  : 15.0.4
   @ionic/angular-toolkit        : 6.1.0

Cordova:

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

Utility:

   cordova-res : 0.15.4
   native-run  : 1.7.1

System:

   Android SDK Tools : 26.1.1 (C:\Users\R\AppData\Local\Android\Sdk)   
   NodeJS            : v18.12.1 (C:\Program Files\nodejs\node.exe)
   npm               : 8.19.2
   OS                : Windows 10

@prakashbarik90
Copy link

Just change your import:

import android.support.v4.app.ActivityCompat  -> import androidx.core.app.ActivityCompat
import android.support.v4.content.ContextCompat  -> import androidx.core.content.ContextCompat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants