The specific configuration process will not be redundant. A large number of searches are made online. Mainly:
1) download Android NDK;
2) install Cygwin;
3) configure the environment variable of Android NDK in Cygwin. To put it bluntly, it is to map the NDK path in windows to the Cygwin environment, so that the corresponding directory can be found during later compilation;
4) set the properties of the Android project in Eclipse. By setting the working environment and commands, call Cygwin's compilation tool to generate a dynamic Connection Library.
Www.2cto.com
Cygwin is installed to generate a dynamic connection library for Local Code together with the NDK tool. Specific invocation commands can be set in the project attribute of eclipse.
After the configuration is complete, I flipped through an error. Although so can be built normally, the prompt "java. lang. usatisfiedLinkError ", has not found the cause of the problem, and then suddenly thought that the jni code is copied from the NDK sample, and the Class that calls the Native code is defined by itself, which is different from the Class in the sample. Is it because the package name of the Java Class is inconsistent with the class name? Open the JNI code and check that the Natave method has a naming rule: javascom_example_hellojni should be the Java package that calls Native code, and HelloJni should be the Java class that calls Native code. The package where your Java Class is located is the same as that in the sample. The difference is only the Class name, so you can rename your Class, OK, and run smoothly!