I spoke about ant in my previous blog. Link:
Http://blog.csdn.net/androidbluetooth/article/details/6594401
This blog will continue to use ant to compile the android open-source project: sipdroid
1. sipdroid
Svn is required to download the source code, and svn and configuration are downloaded by yourself. If you are a linux system, it will be very simple.
Project Introduction: http://code.google.com/p/sipdroid/
Source code download: http://code.google.com/p/sipdroid/source/checkout
2. Compile
After the download, the project source code is located at/sipdroid-read-only.
Modify sipdroid-read-only to sipdroid
Cd/home/mark/workspace/mPro
Android update project-p sipdroid/-t android-8
Then, do the following:
Cd sipdroid
Ant debug
If you see the following information, congratulations!
After compilation, an apk file is generated in the sipdroid/bin directory.
3. Import eclipse
Open eclipse and import the project.
OK. Start the study!
4. Legacy issues
When NDK is used to compile the files under the jni file, an error is returned:
Android NDK: There is no Android. mk under/home/mark/workspace/mPro/sipdroid/jni
Android NDK: If this is intentional please define APP_BUILD_SCRIPT to point
Android NDK: to a valid NDK build script.
/Home/mark/android/android-ndk-r5c/build/core/add-application.mk: 126: *** Android NDK: Aborting... Stop.
Then, modify the Application. mk file and compile the file. An error is returned:
Android NDK:/home/mark/workspace/mPro/sipdroid/jni/../jni/Android. mk: silkcommon: LOCAL_MODULE_FILENAME must not contain a file extension
/Home/mark/android/android-ndk-r5c/build/core/build-static-library.mk: 29: *** Android NDK: Aborting. Stop.
If the compilation is successful, please do not hesitate to inform us!
Solution:
Find the Android. mk file in the jni directory of the source code, which contains the following content in line 90th:
SILK: = silk
LOCAL_MODULE: = silkcommon
LOCAL_SRC_FILES: = $ (SILK)/src/SKP_Silk_A2NLSF.c \
Changed:
Include $ (CLEAR_VARS)
SILK: = silk
LOCAL_MODULE: = silkcommon
LOCAL_SRC_FILES: = $ (SILK)/src/SKP_Silk_A2NLSF.c \
Compile again!
Author: AndroidBluetooth