Friday, April 18, 2014

Andrews JNI calls on the issue, ask you seniors! ! ! ! ! ! ! !


Examples of just getting started with the JNI, find Hello-jni works in the following example NDK document, compiled inside the file, generates a hell-jni.so file, and then deploy the project to the real machine above, in the real machine above always looking for tips Less than hell-jni.so file, as





As long as the tutorial comes into libs / armeabi directory, so files can be called to deploy to a real machine also can be used directly above

Why do so, it is also not able to find the file, what are we going to set permissions for
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
mk file as
LOCAL_PATH: = $ (call my-dir)

include $ (CLEAR_VARS)

LOCAL_MODULE: = hello-jni
LOCAL_SRC_FILES: = hello-jni.c

include $ (BUILD_SHARED_LIBRARY)
Reply:
so put libs lib at the beginning of the following naming need to say your name so it should be libhello-jni.so
Reply:
Agree with # 2, compiled over the normal, the default prefix with lib,
Lib prefix so just try my library under a project removed, the result return null problem arises when you start.
Reply:
reference to the second floor lieri111 reply:
so put libs lib at the beginning of the following naming need to say your name so it should be libhello-jni.so < / blockquote>


Yes, I try
Reply:
reference to the third floor James506 reply:
agree with # 2, compiled over the normal, the default prefix with lib,
Lib prefix so just try my library under a project removed, the result return null problem arises when you start.


I test it, or not, if coupled libhello-jni.so, then the activity of the modified
static {
System.loadLibrary ("libhello-jni");
}
Still the same message can not be loaded libhello-jni, should not you say this issue
Reply:
reference to the second floor lieri111 reply:
so put libs lib at the beginning of the following naming need to say your name so it should be libhello-jni.so < / blockquote>


I test it, or not, if coupled libhello-jni.so, then the activity of the modified
static {
System.loadLibrary ("libhello-jni");
}
Still the same message can not be loaded libhello-jni, should not you say this issue
Reply:
reference to the 6th floor yierhan111 reply:
Quote: references to the second floor lieri111 reply:

so put libs lib at the beginning of the following naming need to say your name so it should be libhello-jni.so


I test it, or not, if coupled libhello-jni.so, then the activity of the modified
static {
System.loadLibrary ("libhello-jni");
}
Still the same message can not be loaded libhello-jni, should not you say this problem


Library name changed libhello-jni.so,
Source code to remove lib prefix, using load statement follows:
System.loadLibrary ("hello-jni");




Reply:
# 7 using the method you try. Do not add lib when loaded.
Reply:
Is not installed on the machine when it really needs what permissions settings, otherwise SO files are not deployed in the past, my Samsung NOTE8.0

Reply:
reference to the 7th floor iltgcl reply:
Quote: references to the 6th floor yierhan111 reply:

Quote: references to the second floor lieri111 reply:

so put libs lib at the beginning of the following naming need to say your name so it should be libhello-jni.so


I test it, or not, if coupled libhello-jni.so, then the activity of the modified
static {
System.loadLibrary ("libhello-jni");
}
Still the same message can not be loaded libhello-jni, should not you say this problem


Library name changed libhello-jni.so,
Source code to remove lib prefix, using load statement follows:
System.loadLibrary ("hello-jni");





Worse, it really is the case, thank you seniors

No comments:

Post a Comment