Hello Pytorch’s community. I looked at the existing topics on this issue, but did not find a suitable solution for myself.
The problem is: I getting
E/log: error java.lang.ClassNotFoundException: Didn’t find class “org.pytorch.PyTorchAndroid” on path: DexPathList[[zip file “/data/app/~~5hf8jgRJFfzqOKLB8ckRxQ==/com.example.ndk_camera_jni-gl6E_Jg9_yyZyXm5mIbJ8A==/base.apk”],nativeLibraryDirectories=[/data/app/~~5hf8jgRJFfzqOKLB8ckRxQ==/com.example.ndk_camera_jni-gl6E_Jg9_yyZyXm5mIbJ8A==/lib/arm64, /data/app/~~5hf8jgRJFfzqOKLB8ckRxQ==/com.example.ndk_camera_jni-gl6E_Jg9_yyZyXm5mIbJ8A==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
A/.ndk_camera_jn: java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: Didn’t find class “org.pytorch.PyTorchAndroid”
I have tried different version: 1.12, 1.9, 1.10. Also, I have tried ‘org.pytorch:pytorch_android_lite:1.9.0’ (lite version), but all time getting the same error.
Just one point need to admit, that I have entry point on NDK layer. It means, that my application started execution from c++ jni. After that it use some method from java layer.
Does somebody face this problem? Maybe someone has a suggestion where should I to find solution
Best regards, Taras