devnied / EMV-NFC-Paycard-Enrollment

A Java library used to read and extract data from NFC EMV credit cards (Android/PCSC).
Apache License 2.0
1.49k stars 600 forks source link

Android error: Cannot resolve symbol 'CardChannel' #53

Closed klacus closed 4 years ago

klacus commented 5 years ago

When I try to follow the IProvider sample in Android Studio (3.5.2, JRE 1.8.0_202, JVM OpenJDK, on Linux), the following error messages appear: Cannot resolve symbol 'CardChannel'

It cannot find smartcardio. The import.smartcardio fails with message: "Cannot resolve symbol 'smartcardio' "

Am I missing a dependency other than the "implementation 'com.github.devnied.emvnfccard:library:3.0.0' ?"

Android does not seem to have javax.smartcardio. How did you solve it in the sample app on Google Play?

The sample application from Google Play works, but I stuck with these error messages when trying to follow the samples and use the library. I really like how this library is build, but could not figure out how to use it in my project. Spinning around this for 2 weeks now. Any help is appreciated!

RiusmaX commented 4 years ago

Same problem here ! Did you find any solution ?

devnied commented 4 years ago

For Android you just need to use the library:

<dependency>
  <groupId>com.github.devnied.emvnfccard</groupId>
  <artifactId>library</artifactId>
  <version>xxx</version>
</dependency>

The PcscProvider is only for desktop applications. I have added a provider sample for Android