使用 Java 中的本机代码进行 Proguard

tis*_*shu 5 java java-native-interface proguard

我有一个罐子,我想缩小和混淆它。它引用自定义 JNI 库。我的 proguard conf 文件中有这个:

# Keep names - Native method names. Keep all native class/method names.
-keepclasseswithmembers,includedescriptorclasses class * {
    native <methods>;
}
Run Code Online (Sandbox Code Playgroud)

但仍然在运行时我得到:

Exception in thread "Thread-2" java.lang.NoSuchMethodError: error
    at com.test.model.Video.naInit(Native Method)
    at com.test.model.Video.a(Video.java:95)
    at com.test.ui.ExportWindow$8.run(ExportWindow.java:561)
Run Code Online (Sandbox Code Playgroud)

这是 Video.java 中调用的第一个 JNI 方法

private native int naInit(String inFileName, String outFileName);
Run Code Online (Sandbox Code Playgroud)

我认为上面的混淆线应该保留所有本机名称?有人可以告诉我我做错了什么吗?