AnyLifeZLB / FaceVerificationSDK

Android On_device 1:1 Face Recognition And Alive Detect;1:N & M:N Face Search SDK 。 🧒 离线版设备端Android1:1人脸识别动作活体检测,静默活体检测 以及1:N M:N 人脸搜索 SDK 封装
385 stars 74 forks source link

人脸识别界面“Verify_11_javaActivity”不支持在子进程运行 #34

Closed kingfarou closed 4 months ago

kingfarou commented 5 months ago

如果在AndroidManifest文件里,对Verify_11_javaActivity添加支持多进程调用(multiprocess属性): <activity android:name=".face.Verify_11_javaActivity" android:exported="false" android:theme="@style/Theme.AppCompat.NoActionBar" android:multiprocess="true"/>

则activity无法启动,异常信息如下: 2024-02-19 15:16:42.286 1100-1214 WifiVendorHal pid-1100 E getWifiLinkLayerStats_1_3_Internal(l.973) failed {.code = ERROR_NOT_SUPPORTED, .description = } 2024-02-19 15:16:45.095 11800-11800 AI com.crcgas.rigUAT E 生成的随机活体步骤: 1 2024-02-19 15:16:45.095 11800-11800 AI com.crcgas.rigUAT E 生成的随机活体步骤: 0 --------- beginning of crash 2024-02-19 15:16:45.280 11800-11800 AndroidRuntime com.crcgas.rigUAT E FATAL EXCEPTION: main Process: com.crcgas.rigUAT:unimp0, PID: 11800 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.crcgas.rigUAT/com.crcgas.commonlib.face.Verify_11_javaActivity}: java.lang.IllegalStateException: MlKitContext has not been initialized at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3491) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3643) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)

看起来主要问题是MlKitContext初始化异常,请排查处理一下哈~

AnyLifeZLB commented 5 months ago

我看看直接在本 Demo 中配置多进程试试排查问题所在

AnyLifeZLB commented 5 months ago

@kingfarou 你好,MlKitContext好像不是本SDK或本Demo 定义的对象。我们使用本Demo 在AndroidManifest文件里,对Verify_11_javaActivity添加支持多进程调用(multiprocess属性),都能正常运行

请下载本Demo 定义多进程试试是否有问题,如果是集成到你的个人项目中的问题请排查或提供更多信息