![如何修复这个错误? make: *** [obj/local/armeabi/libgstaudioflinger.so] 错误 1](https://linux22.com/image/19688/%E5%A6%82%E4%BD%95%E4%BF%AE%E5%A4%8D%E8%BF%99%E4%B8%AA%E9%94%99%E8%AF%AF%EF%BC%9F%20make%3A%20***%20%5Bobj%2Flocal%2Farmeabi%2Flibgstaudioflinger.so%5D%20%E9%94%99%E8%AF%AF%201.png)
我正在尝试使用 SDK/NDK 将以下框架从我的 Linux Fedora 盒子安装到 Android。但在遵循所有指令后,它仍然无法构建。知道如何修复它吗?
1) 鸡蛋
$ cd /var/tmp
$ git clone git://git.collabora.co.uk/git/user/reynaldo/gstreamer_ndk_bundle
$ cd gstreamer_ndk_bundle
$ git submodule update --init
2) 掉落
$ cd /var/tmp
$ wget http://dl.google.com/android/ndk/android-ndk-r7-linux-x86.tar.bz2
$ tar xvfj android-ndk-r7-linux-x86.tar.bz2
$ wget http://dl.google.com/android/android-sdk_r15-linux.tgz
$ tar xvfz android-sdk_r15-linux.tgz;
$ export PATH=$PATH:/var/tmp/android-ndk-r7
$ export PATH=$PATH:/var/tmp/android-sdk-linux/tools
#############################
# Try 1: failed
#############################
$ ./setup.sh
Updated project.properties
Updated local.properties
Updated file ./build.xml
Updated file ./proguard.cfg
android_headers
faad
glib
gnonlin
gst-android
gst-editing-services
gst-openmax
gst-plugins-bad
gst-plugins-base
gst-plugins-good
gst-plugins-ugly
gstreamer
jni
libid3tag
libmad
ogg
res
src
x264
/var/tmp/android-ndk-r7/prebuilt/linux-x86/bin/awk: /var/tmp/android-ndk-r7/prebuilt/linux-x86/bin/awk: cannot execute binary file
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
/var/tmp/android-ndk-r7/build/core/init.mk:258: *** Android NDK: Aborting. . Stop.
# use this to fix this error
$ mv /var/tmp/android-ndk-r7/prebuilt/linux-x69/bin/awk awk_
#############################
# Try 2: failed
#############################
$ ./setup.sh
> Android.mk
/bin/sh: line 1: androgenizer: command not found
make[1]: *** [Android.mk] Error 127
make[1]: Leaving directory `/home/sun/Downloads/gstreamer_ndk_bundle/faad/libfaad'
make: *** [libfaad-configure] Error 2
# use following to fix this above error
$ git clone git://git.collabora.co.uk/git/user/derek/androgenizer.git
$ make
$ export PATH=$PATH:/var/tmp/gstreamer_ndk_bundle/androgenizer
#############################
# Try 3: failed
#############################
$ ./setup.sh
/var/tmp/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: cannot find -lmedia
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libgstaudioflinger.so] Error 1
# How to fix this error?
3)出生
@TODO
$ ./install_bundle.sh
答案1
我将你的注意力集中在实际的输出中的错误消息:
Android NDK: Host 'awk' tool is outdated. Please define HOST_AWK to point to Gawk or Nawk !
/var/tmp/android-ndk-r7/build/core/init.mk:258: *** Android NDK: Aborting. . Stop.
通过包管理器安装最新版本的 gawk 或 nawk,然后重试。
答案2
r7 中捆绑了一个错误的 awk 版本。试试r7b。