LinPhone为Android构建流程

时间:2012-02-23 05:07:09

标签: android-ndk

我正在为Android构建Linphone应用程序。我在Ubuntu 11.04操作系统中工作。

我遵循README文件中给出的步骤:

  1. 从谷歌下载Android ndk(> = r5c)。
  2. 安装autotools:autoconf,automake,aclocal,libtoolize pkgconfig
  3. 在顶级目录中运行./prepare_sources.sh脚本。这将下载iLBC源文件并转换VP8项目中的一些汇编文件 $ ./prepare_sources.sh

  4. 最后从目录linphone-android,只需执行命令:
    $ ${my google ndk directory}/ndk-build

  5. 我在终端输出

    StaticLibrary  : libopencoreamr.a 
    Compile arm    : vpx <= vpx_mem.c 
    In file included from jni/..//submodules/externals/build/libvpx/../../libvpx/vpx_mem/vpx_mem.c:18: 
    
    jni/..//submodules/externals/build/libvpx/../../libvpx/vpx_mem/include/vpx_mem_intrnl.h:14:24: error: vpx_config.h: No such file or directory 
    make: *** [obj/local/armeabi-v7a/objs/vpx/vpx_mem/vpx_mem.o] Error 1 
    

    如果我解决了这个错误,我将能够编译并运行Linphone应用程序。有人请帮我解决这个问题。

5 个答案:

答案 0 :(得分:2)

  1. 打开终端
  2. 通过命令下载源代码:git clone git://git.linphone.org/linphone-android.git --recursive
  3. 通过以下命令转到下载项目的根目录:cd / home / your_downloaded_project_path /
  4. 触发命令:./ prepare_sources.sh / home / android-ndk-r7b /
  5. 通过命令转到NDK文件夹的根目录:cd / home / android-ndk-r7b /
  6. 触发命令:export NDK_PROJECT_PATH = / home / your_downloaded_project_path /
  7. ./ ndk_build clean
  8. ./ ndk_build -i
  9. 注意:/ home / android-ndk-r7b /将是您存储下载的NDK的NDK路径

    尝试dis..if仍然没有工作提及错误你会得到什么。

答案 1 :(得分:2)

执行prepare_sources

时,必须指定ndk的完整路径
$./prepare_sources.sh /complete/path/to/android-ndk

如果你只指定了ndk的相对路径,它也会抛出相同的错误。

然后,您可以调用'ndk-build','ant debug',......无论你想要什么。

答案 2 :(得分:1)

另外一个关键问题似乎是你必须使用NDK的第7版

答案 3 :(得分:0)

仔细检查prepare_sources.sh的输出是否有错误。此阶段的错误可能导致您描述的错误。

答案 4 :(得分:0)

如果你还需要答案......

在您的ubuntu 11.04中,打开您的终端,确保您是root用户

* make sure you have done this: "git clone git://git.linphone.org/linphone-android.git --recursive" //*the --recursive part is very important
* then do this: apt-get install autoconf automake libtool pkg-config
* go to your project root: cd/home/user/project //wherver your project is
* in your project root: export PATH=/home/user/android-ndk:$PATH //wherever your android-ndk is stored in
* then run ./prepare_sources.sh //in your project root still
* after that do this: /home/user/android-ndk/ndk-build // in your project root too
相关问题