Invoking JNI functions in Android package name containing underscore

核能气质少年 提交于 2019-12-03 04:54:22

You should follow the underscore with the number 1. So if your package name contains ing_simmons then your JNI would be formed like so.

void Java_co_uk_ing_1simmons_aberdeensoundsites_Record_initEncoder

This is true also if you have underscores in any other part of the call, such as class name or method name in the Java file.

JNI spec quote on the _1 rule

The _1 rule scriptocalypse mentions is part of the JNI spec 8 Chapter 2: Design Overview - Resolving Native Method Names:

Escape Sequence     Denotes
_1                  the character “_” 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!