bitpay / cordova-plugin-qrscanner

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

Build issue - cannot find symbol import org.apache.cordova.PermissionHelper; #180

Open jeevan-raj opened 6 years ago

jeevan-raj commented 6 years ago

Hi,

I'm getting the following error while trying to build the project.

:compileDebugJavaWithJavacD:\dupont\laserfarm\aemm\plugins\platforms\android\src\com\bitpay\cordova\qrscanner\QRScanner.java:21: error: cannot find symbol import org.apache.cordova.PermissionHelper; ^ symbol: class PermissionHelper location: package org.apache.cordova 1 error ![error]

(https://user-images.githubusercontent.com/40687115/42080286-c9c099fe-7b9f-11e8-9094-c72418d11b94.PNG)

Kindly help in resolving this issue.

superduck35 commented 6 years ago

I reverted back to 2.4.0 and it fixed this issue. I think the problem is with the removal of cordova-plugin-compat in #139 here

I suspect that adding this line back in will let you run the build - going to test it out.. will report back :)

Edit: Just realised that its not possible for me to test that without a lot of work as ionic automatically pulls and compiles the plugin when I add it. @vially would you be able to verify if this is the problem? I'd like to use 2.6.0 if possible

vially commented 6 years ago

I may need some more info before I can have an opinion but it looks like you're using a version of cordova-android older than 6.3.0. If that's the case you should be able to fix it by adding cordova-plugin-compat to your config.xml (or bumping cordova-android if that's an option) and then you should be able to use qrscanner version 2.6.0. I'm not able to test it right now though, so I may be wrong.

superduck35 commented 6 years ago

Thanks @vially you were correct, good one. Cool!

allannaranjo commented 6 years ago

Hi, I'm using Cordova 7.0.1, and getting the same "import org.apache.cordova.PermissionHelper" error, I would like to use the version 2.6.0 of this plugin, is there any instructions I can follow to install and overcome this issue? Thanks

basurahan commented 6 years ago

Im getting the same issue did anyone solve this problem? Pls i need Help asap

allannaranjo commented 6 years ago

Im getting the same issue did anyone solve this problem? Pls i need Help asap

I had to use an older version for this.

jeevan-raj commented 6 years ago

Using older version(6.5) solved the issue.

On Sun, 1 Jul 2018, 5:01 pm Alex Scott <notifications@github.com wrote:

I reverted back to 2.4.0 and it fixed this issue. I think the problem is with the removal of cordova-plugin-compat in #139 https://github.com/bitpay/cordova-plugin-qrscanner/pull/139 here https://github.com/bitpay/cordova-plugin-qrscanner/commit/85e2396

I suspect that adding this line back in will let you run the build - going to test it out.. will report back :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bitpay/cordova-plugin-qrscanner/issues/180#issuecomment-401600793, or mute the thread https://github.com/notifications/unsubscribe-auth/AmzWC9WPvBhjZDEXkm9K2i06Wu7E6YTaks5uCLMHgaJpZM4U8mLu .