Jump to content
Michael W. S.

Kastri cross-platform library

Recommended Posts

I'm trying out the biometric demo in Kastri project.

 

I followed the instructions in the readme to

a) right-click in Library, Revert System Files to Default

b) project-clean, project-build

 

But I'm getting multiple errors.

I'm using Java version 8.  It has no issues with running other Android64 projects, only this biometric one.

 

Checking project dependencies...
Compiling BiometricDemoD11.dproj (Release, Android64)

paclient command line
  c:\program files (x86)\embarcadero\studio\22.0\bin\paclient.exe -u8 --dexmerge="C:\Program
  Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\java.exe,c:\program files
  (x86)\embarcadero\studio\22.0\bin\Android\r8-3.0.73.jar,C:\lib\kastri\Demos\Biometric\Android64\Release\BiometricDemoD11.classes,C:\lib\kastri\Demos\Biometric\Android64\Release\dex_list.txt"
   
[PAClient Error] Error: E7688 Unable to execute '"C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\bin\java.exe" -cp "c:\program files (x86)\embarcadero\studio\22.0\bin\Android\r8-3.0.73.jar" com.android.tools.r8.D8 --output "C:\lib\kastri\Demos\Biometric\Android64\Release\BiometricDemoD11.classes" @"C:\lib\kastri\Demos\Biometric\Android64\Release\dex_list.txt"' (Error 1)
[PAClient Error] Error: E7688 Error in c:\program files (x86)\embarcadero\studio\22.0\lib\android\Release\fragment-1.0.0.dex.jar:classes.dex:
[PAClient Error] Error: E7688 Type androidx.fragment.app.BackStackState$1 is defined multiple times: c:\program files (x86)\embarcadero\studio\22.0\lib\android\Release\fragment-1.0.0.dex.jar:classes.dex, C:\lib\kastri\Demos\Biometric\Android64\Release\fragment-1.3.6-dexed.jar:classes.dex
[PAClient Error] Error: E7688 Compilation failed
[PAClient Error] Error: E7688 Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: c:\program files (x86)\embarcadero\studio\22.0\lib\android\Release\fragment-1.0.0.dex.jar:classes.dex
[PAClient Error] Error: E7688     at com.android.tools.r8.utils.w.a(SourceFile:92)
[PAClient Error] Error: E7688     at com.android.tools.r8.D8.main(D8.java:4)
[PAClient Error] Error: E7688 Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: c:\program files (x86)\embarcadero\studio\22.0\lib\android\Release\fragment-1.0.0.dex.jar:classes.dex
[PAClient Error] Error: E7688     at Version.fakeStackEntry(Version_3.0.73.java:0)
[PAClient Error] Error: E7688     at com.android.tools.r8.utils.w.a(SourceFile:68)
[PAClient Error] Error: E7688     at com.android.tools.r8.utils.w.a(SourceFile:28)
[PAClient Error] Error: E7688     at com.android.tools.r8.utils.w.a(SourceFile:27)
[PAClient Error] Error: E7688     at com.android.tools.r8.utils.w.b(SourceFile:3)
[PAClient Error] Error: E7688     at com.android.tools.r8.D8.a(D8.java:17)
[PAClient Error] Error: E7688     at com.android.tools.r8.D8.a(D8.java:15)
[PAClient Error] Error: E7688     at com.android.tools.r8.utils.w.a(SourceFile:84)
[PAClient Error] Error: E7688     ... 1 more
[PAClient Error] Error: E7688 Caused by: com.android.tools.r8.internal.b: Type androidx.fragment.app.BackStackState$1 is defined multiple times: c:\program files (x86)\embarcadero\studio\22.0\lib\android\Release\fragment-1.0.0.dex.jar:classes.dex, C:\lib\kastri\Demos\Biometric\Android64\Release\fragment-1.3.6-dexed.jar:classes.dex
[PAClient Error] Error: E7688     at com.android.tools.r8.internal.UA.a(SourceFile:14)
[PAClient Error] Error: E7688     at com.android.tools.r8.internal.UA.a(SourceFile:22)
[PAClient Error] Error: E7688     at com.android.tools.r8.internal.Fw.b(SourceFile:6)
[PAClient Error] Error: E7688     at com.android.tools.r8.internal.Fw.a(SourceFile:23)
[PAClient Error] Error: E7688     at com.android.tools.r8.internal.Fw.a(SourceFile:10)
[PAClient Error] Error: E7688     at java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:1990)
[PAClient Error] Error: E7688     at com.android.tools.r8.internal.Fw.a(SourceFile:6)
[PAClient Error] Error: E7688     at com.android.tools.r8.graph.I0$c.f(SourceFile:3)
[PAClient Error] Error: E7688     at com.android.tools.r8.dex.a.a(SourceFile:94)
[PAClient Error] Error: E7688     at com.android.tools.r8.dex.a.a(SourceFile:23)
[PAClient Error] Error: E7688     at com.android.tools.r8.D8.a(D8.java:21)
[PAClient Error] Error: E7688     at com.android.tools.r8.D8.d(D8.java:11)
[PAClient Error] Error: E7688     at com.android.tools.r8.D8.c(D8.java:1)
[PAClient Error] Error: E7688     at com.android.tools.r8.utils.w.a(SourceFile:24)
[PAClient Error] Error: E7688     ... 5 more
Failed

Share this post


Link to post

 

38 minutes ago, Michael W. S. said:

I followed the instructions in the readme to

a) right-click in Library, Revert System Files to Default

There are no such instructions in the readme for that demo project. Doing so is what has caused your problem, as it has re-enabled the jars that need to be disabled. Please re-load the original version of the demo project (BiometricD11)

 

 

 

Share this post


Link to post

Thanks, Dave!

 

https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidLibraries

 

I mis-read the linkonly meant for projects created in Delphi 10.4, so I need not do anything if opening

BiometricDemoD11.dproj

 

I'm using Delphi 11.2.  Note 8, Android 9 (android security patch level 1 april 2021)

 

Used back the original demo files, and now the project compiles and loads to Android phone.

 

When I click the "fingerprint image" in the app in Android 9, the app closes.

 

I checked Permissions.  "Use Biometric" is enabled.

Is there a known issue with Delphi 11.2 and Android 9?

 

I tried adding dw-biometric-2.0.0.jar in right-click Project, Android64-Library but it does not add for some reason.

 

Appreciate for any advice.

 

 

Share this post


Link to post
40 minutes ago, Michael W. S. said:

Is there a known issue with Delphi 11.2 and Android 9?

You mean Delphi 11.1? Delphi 11.2 is yet to be released. I just checked on my Android 9 device - it appears there is an issue. I'll repost again after I've found a solution.

40 minutes ago, Michael W. S. said:

I tried adding dw-biometric-2.0.0.jar in right-click Project, Android64-Library but it does not add for some reason.

Because it needs to be added to Android 32-bit only. It will apply to both.

Edited by Dave Nottage

Share this post


Link to post

yes, 11.1 the latest patch.

 

Thanks for checking this out on Android 9.  Look forward to the fix.

 

When I try to run the biometric module from my own project (not the demo), I get a

"Java type JBiometricManager could not be found" error.

 

thanks.

Share this post


Link to post

hi Dave, thanks much for the link. didn't realise there were quite a lot of changes required to configure D11 for biometric.

 

just wondering if there is a quick fix for biometric on Android 9 using latest D11.x ... I'm surprised nobody tried this configuration for the past months and found that it crashed the app.

Share this post


Link to post
2 minutes ago, Michael W. S. said:

just wondering if there is a quick fix for biometric on Android 9 using latest D11.x

There was a "quick fix", however my preference is for something long-term, which I happen to be working on right now. You could try adding this jar to the Android Libraries in the project, however bear in mind the app may still fail depending on what other resources Delphi might deploy.

Share this post


Link to post

Just wondering whether there's a possibility of the fingerprint feature in Android 9 for Delphi 11 working any time soon.

Are there any current versions of Android confirmed working with Delphi 11?

If so, I may try to get a phone with that version, so that I can continue testing.

Share this post


Link to post

Hi Dave, thanks for the reply.

 

Need to digest this a bit... it looks quite complicated. 🙂
I hope the final version will be simpler to deploy. 🙂

Share this post


Link to post
41 minutes ago, Michael W. S. said:

I hope the final version will be simpler to deploy

Well, that's the aim. It's one of either stick with the batch files (which is complicated to use), create a completely external tool (less complicated), or include it in an expert such as Codex (hopefully fairly simple to use). The aim is also to have the process generic so that it can be applied to other projects when needed. There's a link to a Quality Portal report in the readme which is essentially asking for the process to be included in Delphi itself. 

Edited by Dave Nottage

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×