JNI calls in the linux environment to compile files over so, how do I go to call?<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
The wrap write a java class, class native methods and so the interface functions corresponding to
Reply:
/ * Function segment begin * /
private native void init ();
static
{
Log.d (TAG, "load libuninstalled_moniter");
try {
System.loadLibrary ("uninstalled_moniter");
/ / System.loadLibrary ("moniter");
} Catch (UnsatisfiedLinkError ule) {
ule.printStackTrace ();
}
}
@ Override
public void onCreate (Bundle savedInstanceState)
{
super.onCreate (savedInstanceState);
Log.d (TAG, "onCreate");
setContentView (R.layout.uninstalled_moniter_layout);
init ();
}
/ * Function segment end * /
}
Simple JNI call, first declared so in the library method, and then load the SO library, declared in a method call
Reply:
When you call ffmpeg, error: In file included from jni / ffmpeg / libavutil / avutil.h: 238:0,
from jni / ffmpeg / libavutil / samplefmt.h: 24,
from jni / ffmpeg / libavcodec / avcodec.h: 30,
from jni / tiger.c: 5:
jni / ffmpeg / libavutil / common.h: 40:32: fatal error: libavutil / avconfig.h: No such file or directory
compilation terminated.
Seek guidance
Reply:
Open the third party so
way with dlopen http://www.cnblogs.com/lovelili/archive/2012 / 03/10/2389172.html
Reply:
Static load directly inside the code block is not on the list?
Reply:
When I first called, at the time run ndk-build: Unable to identify the format of the input file ... how to solve these neighborhoods
Reply:
It is recommended to take a look SD folder following code example
Seems to be in SDK / simple / JNI you look at the calling process,
See the CPP
generate SO
No comments:
Post a Comment