This would be fine if my minSdkVersion would be lower than 15 which I guess is the case for most projects, but I want to build a version of my app with minSdkVersion 21 which is impossible due to this behaviour of the barcodescanner plugin.
The problem stops if I remove this line: https://github.com/phonegap/phonegap-plugin-barcodescanner/blob/master/src/android/barcodescanner.gradle#L1
Same here.
And here https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/233
I cloned this repo and removed the min sdk build instruction, if you want to use it on phonegap build:
<gap:plugin spec="https://github.com/gustavocampos/phonegap-plugin-barcodescanner" source="git" />
Ah thanks! Do not understand why they do not fix this though! :(
I am affected by this as well and i took me hours to find out what was happening until i manually removed and re-added all plugins to find out.
I looked at @gustavocampos work and tried to improve by online setting the ext.cdvMinSdkVersion if not yet set or smaller then the current minSdkVersion for this plugin. For me, this fixes the issues.
@ben-8409 does it works with Adobe PhoneGap Build? If yes, can you explain how to change it online?
@gustavocampos I tried with cordova. Can you tell me the minimal steps to test in phonegap? I am running Linux, if that matters.
@ben-8409 the problem with PhoneGap Build is that you cannot change much during the build process, any changes you made for manifest are lost if some plugin overrides it, the build is done online on Adobe servers.
You'd have to create a project there https://build.phonegap.com/ and do some changes in your config.xml, don't bother doing it I was just curious about how you built the package.
This is how I tried to verify in phonegap:
However, it seems settings in config.xml are still ignored. So this is only a half fix.
Same bug on 6.0.4 version
It check cdvMinSdkVersion (gradle param) not a minSdkVersion set in AndroidManifest.xml
Are there any updates on if this issue will be resolved / merged? Due this hard coded 15 my Cordova app has a minSdk of 15 while our app only works from 21. This value is overridden when the barcode plugin is used.
This thread has been automatically locked.
Most helpful comment
It check cdvMinSdkVersion (gradle param) not a minSdkVersion set in AndroidManifest.xml