From 516fe7e47b7d52007eb2500c8861310298b1562b Mon Sep 17 00:00:00 2001 From: xiangsilian Date: Tue, 9 Sep 2025 21:52:27 +0800 Subject: [PATCH] save code --- and_proj/app/build.gradle | 13 +++++++++++++ and_proj/build.gradle | 1 + .../khronos/vulkan_samples/FaceLandmarkerHelper.kt | 5 ----- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/and_proj/app/build.gradle b/and_proj/app/build.gradle index 8140fb0..898811b 100644 --- a/and_proj/app/build.gradle +++ b/and_proj/app/build.gradle @@ -1,5 +1,6 @@ plugins { id 'com.android.application' + id 'org.jetbrains.kotlin.android' } ext.vvl_version='1.4.321.0' @@ -77,6 +78,9 @@ android { viewBinding true prefab true } + kotlinOptions { + jvmTarget = '21' + } } dependencies { @@ -85,4 +89,13 @@ dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.2.0' implementation 'androidx.core:core:1.15.0' implementation 'androidx.games:games-activity:3.0.5' + implementation 'androidx.core:core-ktx:1.17.0' + // CameraX core library + def camerax_version = '1.4.2' + implementation "androidx.camera:camera-core:$camerax_version" + implementation "androidx.camera:camera-camera2:$camerax_version" + implementation "androidx.camera:camera-lifecycle:$camerax_version" + implementation "androidx.camera:camera-view:$camerax_version" + //noinspection Aligned16KB + implementation 'com.google.mediapipe:tasks-vision:0.20230731' } diff --git a/and_proj/build.gradle b/and_proj/build.gradle index ab41e47..192f3bd 100644 --- a/and_proj/build.gradle +++ b/and_proj/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.application' version '8.12.2' apply false id 'com.android.library' version '8.12.2' apply false + id 'org.jetbrains.kotlin.android' version '2.2.0' apply false } tasks.register('clean', Delete) { diff --git a/app/android/java/com/khronos/vulkan_samples/FaceLandmarkerHelper.kt b/app/android/java/com/khronos/vulkan_samples/FaceLandmarkerHelper.kt index b6a76fc..6ac650c 100644 --- a/app/android/java/com/khronos/vulkan_samples/FaceLandmarkerHelper.kt +++ b/app/android/java/com/khronos/vulkan_samples/FaceLandmarkerHelper.kt @@ -62,11 +62,6 @@ class FaceLandmarkerHelper( return faceLandmarker == null } - // Initialize the Face landmarker using current settings on the - // thread that is using it. CPU can be used with Landmarker - // that are created on the main thread and used on a background thread, but - // the GPU delegate needs to be used on the thread that initialized the - // Landmarker fun setupFaceLandmarker() { // Set general face landmarker options val baseOptionBuilder = BaseOptions.builder()