Cannot Resolve Corresponding JNI Function Java_com_android_inputmethod_keyboard_ProximityInfo_setProximityInfoNative

后端 未结 1 925
有刺的猬
有刺的猬 2020-12-12 04:37

I\'m building LatinIME source code provided by google-source in android-studio but i got a bug in ProximityInfo.java line 89 which show a dialog and i have

相关标签:
1条回答
  • 2020-12-12 05:21

    Your screenshot suggests that your jniLibs contains a jar file with prebuilt native library. I did not know that this is even possible, but yes, it works in Android Studio 2.3 and higher. Nice!

    Anyways, as I explained elsewhere, don't expect Android Studio to resolve magically the native method declarations into a prebuilt library (even if it is unpacked into src/main/jnLibs).

    You can simply ignore this error message: your APK will still install the prebuilt library, and the native method will be resolved at run time.

    You can add @SuppressWarnings("JniMissingFunction") annotation for this method, or for the entire class:

    @SuppressWarnings("JniMissingFunction")
    public class ProximityInfo {
    

    or configure this kind of Lint inspections for the given project, or for all projects:

    0 讨论(0)
提交回复
热议问题