mjwheatley / cordova-plugin-android-fingerprint-auth

A cordova plugin for fingerprint authentication using the hardware fingerprint scanner on devices running Android 6+
Apache License 2.0
168 stars 131 forks source link

INVALID_ALGORITHM_PARAMETER_EXCEPTION #70

Closed qng5150 closed 7 years ago

qng5150 commented 7 years ago

On a ZTE Blade V7 Plus I'm getting InvalidAlgorithmParameterException.

The device has Android 6 installed so it is at the right API level. I do have a fingerprint registered and a backup password.

qng5150 commented 7 years ago

After I opened the android project in Android Studio, I managed to launch the app and was able to use the fingerprint. I'm suspecting something in the build. will play around more and see if I can work out exactly what it is.

qng5150 commented 7 years ago

Ok. The issue is gradle. Cordova has gradle-2.14.1 as the gradle wrapper. Using gradle-3.3-all works. The hack I had to to isupdated the GradleBuilder.js located in android/cordova/lib/builders

Change the following: var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-2.14.1-all.zip';

to

var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https\\://services.gradle.org/distributions/gradle-3.3-all.zip';

Not sure if there is a way of updating this as a way to set this up via configuration.

qng5150 commented 7 years ago

Actually. Better way is just set an Build env: CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL= https\://services.gradle.org/distributions/gradle-3.3-all.zip