Home > Mobile >  Cross-compilation guidance
Cross-compilation guidance

Time:10-07

Project need to use https://github.com/BelledonneCommunications/vo-amrwbenc,

But do not know how to compile a Android so come out, ask for help, and guidance, thank you,,

Can pass the NDK command line, or AndroidStudio, can all,

Hope to be able to give detailed configuration and compile step

CodePudding user response:

Now use CMake AS if with the above code words, need to get the Android. Mk to CMakeList. TXT configuration

CodePudding user response:

Two options
(1) direct the NDK - build mutate into so libraries on the AS call;
(2) modified into CMakeList. TXT configuration

No matter how to do, have to need to write a call the library entrance CPP source file

CodePudding user response:

refer to the second floor Han Shuliang response:
two options
(1) direct the NDK - build mutate into so libraries on the AS call;
(2) modified into CMakeList. TXT configuration

No matter how to do, all need to write a call the library entrance CPP source file


I tend to plan 1, because CMakeList won't write,,
Would you help me say the plan 1 specific steps? thank you

CodePudding user response:

Write the JNI interface first configuration to Android. The mk, using the NDK cross-compilation toolchain in the NDK - build compiled, and then compile out so library, put in AS good configuration, you can call;

From Java JNI interface is your call to the entrance of the C/C + + function, usually Java_ package name _ the name of the class _ the method name (env JNIEnv *, jobject, a parameter... ), which is written in C or C + +;

Need the JNI or understood something familiar and primary C/C + + code
  • Related