我使用 RenderScript 创建了一个 Android 应用程序,它适用于各种系统,但似乎不能在 Pixel 5 上运行。
我尝试使用真实设备对其进行调试,但找不到问题的根源。我收到以下错误(yuv420888.so
是我的 RS 文件):
Failed loading RS driver: dlopen failed: library "libRSDriver_adreno.so
Failed to load runtime libRSDriver_adreno.so, loading default
...
Unable to open shared library (/data/user_de/0/com.example.app/code_cache/com.android.renderscript.cache/librs.yuv420888.so): (null)
然后我得到了关于一些未实现方法的大量错误:
2022-01-26 11:49:30.190 4366-4972/com.example.app E/CameraCaptureSession: Session 0: Exception while stopping repeating:
android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): cancelRequest:459: Camera 0: Error clearing streaming request: Function not implemented (-38)
at android.hardware.camera2.CameraManager.throwAsPublicException(CameraManager.java:1009)
at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:99)
at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1251)
at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:578)
at android.hardware.camera2.impl.CameraCaptureSessionImpl$2.onDisconnected(CameraCaptureSessionImpl.java:789)
at android.hardware.camera2.impl.CameraDeviceImpl$7.run(CameraDeviceImpl.java:245)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.os.ServiceSpecificException: cancelRequest:459: Camera 0: Error clearing streaming request: Function not implemented (-38) (code 10)
at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
at android.os.Parcel.createException(Parcel.java:2357)
at android.os.Parcel.readException(Parcel.java:2340)
at android.os.Parcel.readException(Parcel.java:2282)
at android.hardware.camera2.ICameraDeviceUser$Stub$Proxy.cancelRequest(ICameraDeviceUser.java:732)
at android.hardware.camera2.impl.ICameraDeviceUserWrapper.cancelRequest(ICameraDeviceUserWrapper.java:97)
有关信息:
以下是我的 gradle 文件中一些随机有趣的设置:
classpath 'com.android.tools.build:gradle:3.3.3'
classpath 'com.google.gms:google-services:4.1.0'
...
multiDexEnabled
renderscriptTargetApi 23
renderscriptSupportModeEnabled false
...
ndkVersion '20.1.5948944'
...
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
moduleName "my_lib"
ldLibs "log"
}
可能是什么问题?