chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 555 forks source link

Using with cordova android version 8.x.x on API SDK 28 #371

Closed itshazlan closed 4 years ago

itshazlan commented 4 years ago

I want to use NFC plugin for my Ionic 3 project using android version 8.1.0 on API SDK 28.

Because when uploading app into the Google Play Store require the latest API SDK 28, and the NFC plugin gives me the error when installing on cordova android version 8.X.X.

It says Error: Unable to graft xml at selector "/manifest/uses-sdk" from "platforms\android\app\src\main\AndroidManifest.xml" during config install at ConfigFile_graft_child [as graft_child]

Please, someone, help me how to troubleshoot the plugin compatibility. Thank you.

flossy commented 4 years ago

+1

at projectRoot/plugins/phonegap-nfc/plugin.xml line: 39 comment out

<!--edit-config file="AndroidManifest.xml" target="/manifest/uses-sdk" mode="merge">
  <uses-sdk android:minSdkVersion="19" />
</edit-config-->

passed $ cordova platform add android

Maybe the minVersion added in config.xml is enough. For your information...

sc0ttdav3y commented 4 years ago

+1

I moved <uses-sdk android:minSdkVersion="19" /> into the <config-file target="AndroidManifest.xml" parent="/manifest"> block above and it works again.

khayargoli commented 4 years ago

I have the same problem, I am using phonegap build. Please have a fix for this on the plugin itself :)

mobidev111 commented 4 years ago

Could anyone of you open a pull request with this fix? then we can ping the maintainer to release a new version.

cesardmoro commented 4 years ago

any fix on this ? i have to edit plugin.xml file but this will be broken on CI

LuisEGR commented 4 years ago

Fixed here: https://github.com/chariotsolutions/phonegap-nfc/pull/372

If you need to use this fix, I uploaded it to NPM so you can use it until the issue gets merged:

npm i phonegap-nfc-fxmanifest

or

ionic cordova plugin add phonegap-nfc-fxmanifest

don commented 4 years ago

372 should fix this