Open mycatnamedweb opened 3 years ago
The latest version of this plugin uses AndroidX. You need the latest version of cordova-android to get this working. Also if you have plugins that are using the support library you can use the cordova androidx adapter plugin to get them working with AndroidX
This should not be a bug but an issue with projects not ready for AndroidX
I did try cordova-plugin-androidx-adapter too and it did not help, same result :(
Tried with cordova androidx adapter plugin but still the issue exists, @NiklasMerz Can you please suggest if there is any work around for this issue when using AndroidX.
Bug report
I use this plugin in my App on iOS and it is working well in production. I encountered multiple issues though trying to make this plugin work on Android (and for now I parked it).
These are the issues:
Issue 1: the compilation failed because it did not recognize the symbol: Build.VERSION_CODES.Q
What I tried:
<preference name="android-targetSdkVersion" value="@@" />
from 28 to 30. No luck.ANDROID_SUPPORT_ANNOTATIONS_VERSION
values in my config.xml to 29. No luck.Workaround that got me past this issue: I cloned this plugin and manually replaced
Build.VERSION_CODES.Q
with the number 28. Loading this modified plugin from the file system got me past that failure.Issue 2: compilation failed due to non supported version of cordova-android. Solution: upgraded from cordova-android 8.1.0 to 9 (other plugins broke so I temporarily removed them in order to first prove that I could make this plugin work on Android).
Issue 3.:
Which files use androidx:
What I tried:
<preference name="AndroidXEnabled" value="true" />
to true but no luck, same error.UPDATE: Using cordova-plugin-androidx it managed to correctly compile this plugin.
I am now stuck with this error (my min sdk version is already 24). This may be unrelated to this plugin.
NOTE: The error "No Java files found that extend CordovaActivity" intermittently came back despite the use of
cordova-plugin-androidx
andcordova-plugin-androidx-adapter
.At this point, I would have to edit the plugin to not use androidx or revert to an older version (but according to the git history that would introduce other bugs). For now, I have to park this due to other priorities.
Environment
Cordova CLI 10.0.0
Plugin version: cordova-plugin-fingerprint-aio@3.0.1
Build environment: