android-face-landmarks
android-face-landmarks copied to clipboard
Some compiling errors: "unresolved reference" and "await suspension"
Hi, I correctly replaced the 2 paths in the "CMakeLists.txt" but the build fails for these errors:
- Class CameraActivity.kt, line 280. "The 'await' suspension point is inside a critical section"
- Class CameraActivity.kt, line 218. "Unresolved reference: maxBy" and "Unresolved reference: it"
- Class CameraUtil.kt, line 66. "Unresolved reference: maxBy" and "Unresolved reference: it"
I'm new to Kotlin syntax, how can I solve them?
Thanks in advance
Ok, I solved the 2nd and 3rd error. Initially I replaced the "maxBy" method with "maxByOrNull". But then I deleted the Android studio project, I reimported it and the maxBy error was solved.
The first error is still here... I coded a workaround (with the delay() method) but when the app "loses" the first detected face and detects the second one, it crashes
Hi @Mik-el, sorry for the late response but I'm a bit busy..
Anyway, good that you managed to solve issue 2 and 3. Following this answer, you can try to use a Mutex instead of the ReentrantLock, just change this line.
It's been a few years that I'm not anymore into Kotlin/Android development, so I may be not able to fully help you... Let me know how it goes