Android uses NDK to compile sipdroid Library and ndksipdroid
Sipdroid is an open-source voip service running on the Android platform. It currently supports audio and video calls;
Project drag pipe address: http://code.google.com/p/sipdroid/
Download the source code. There will be some minor errors when importing eclipse, but they are easy to change, so they will not be repeated;
In the command line window, run the ndk-build command in the file where the project is located (if the ndk is not added to the system environment variable, configure it first );
C:\Users\zy\Desktop\Android SipDroid>ndk-buildAndroid NDK: There is no Android.mk under jni/jniAndroid NDK: If this is intentional please define APP_BUILD_SCRIPT to pointAndroid NDK: to a valid NDK build script.D:/android-ndk-r9c/build/core/add-application.mk:202: *** Android NDK: Aborting... . Stop.
A path error occurs. You need to modify the Application. mk file;
Modify APP_PROJECT_PATH :=$ (call my-dir) to APP_PROJECT_PATH :=$ (call my-dir )/..
Another error occurs when you run the ndk-build command again.
Android NDK: jni/../jni/Android.mk:silkcommon: LOCAL_MODULE_FILENAME must not contain a file extensionD:/android-ndk-r9c/build/core/build-static-library.mk:29: *** Android NDK: Aborting . Stop.
It is obvious that an error occurred while compiling silkcommon. In the Android. mk file, locate silkcommon, as shown below:
SILK := silkLOCAL_MODULE := silkcommonLOCAL_SRC_FILES := $(SILK)/src/SKP_Silk_A2NLSF.c \ $(SILK)/src/SKP_Silk_CNG.c \ ...
Obviously, an include $ (CLEAR_VARS) sentence is missing here. we add this sentence to the top header;
include $(CLEAR_VARS)SILK := silkLOCAL_MODULE := silkcommonLOCAL_SRC_FILES := $(SILK)/src/SKP_Silk_A2NLSF.c \ ...
Execute ndk-build again to compile successfully;
The Library Project is compiled here, rather than the executable App project.