错误1 libav codec.so文件格式无法识别的Andr​​oid GL动态壁纸文件格式、壁纸、错误、无法识别

2023-09-08 09:32:57 作者:激情调酒师

我试图做一个动态壁纸为Android,发挥地处Android的资产设备上的.mp4格式的视频(以我使用的,它实际上将文件复制到在运行时,SD卡的例子/无所谓)

I am trying to make a Live Wallpaper for android that plays an .mp4 video located on the device in android-asset (with the example I am using, it actually copies the file to the sdcard at runtime/doesn't matter)

我发现这个例子并使用该post我能得到我的日食设置与NDK和建设该项目。在Eclipse中构建使用NDK的插件,当我在我的问题的窗口得到这个错误:

I found this example And using this post I was able to get my eclipse set up with NDK and building the project. When building in eclipse using the NDK plugin I get this error in my problems window:

    Description Resource    Path    Location    Type
make: *** [libs/armeabi/libavcodec.so] Error 1  GLWallpaperVideoDemo-master         C/C++ Problem
make: *** Deleting file `libs/armeabi/libavcodec.so'    GLWallpaperVideoDemo-master         C/C++ Problem

我得到同样的错误,如果我尝试运行 NDK的构建从命令提示符。

我从上面的链接下载的项目,然后导入到日食。我添加的lib GLWallpaperService到构建路径,并确保我的NDK是设置。明知lib文件夹改成库我也尝试过移动GLWallpaperService到libs文件夹,这并没有帮助。

I downloaded the project from the link above and then imported into eclipse. I added the lib GLWallpaperService to the build path, and made sure my NDK was setup. Knowing that the lib folder changed to libs I also tried moving the GLWallpaperService to the libs folder, which didn't help.

该项目努力,因为本地库没有建成运行的壁纸时,没有建立在NDK日食得很好,但很明显的错误。

The project builds without NDK just fine in eclipse but obviously errors when trying to run the wallpaper because the native libraries were not built.

我怎样才能解决这个问题?

How can I resolve this error?

推荐答案

在由 git的克隆https://github.com/frankandrobot/GLWallpaperVideoDemo.git 中得到的包是在Linux为主。文件 JNI \\ ffmpeg的-的Andr​​oid \\编译\\ ffmpeg的\\ armeabi \\ lib目录\\ libav codec.so 和其他许多人只是符号链接到实际文件。

The package you get by git clone https://github.com/frankandrobot/GLWallpaperVideoDemo.git is Linux oriented. The file jni\ffmpeg-android\build\ffmpeg\armeabi\lib\libavcodec.so and many others are simply symbolic links to actual files.

为了使这一切工作很容易在Windows上,我建议要到 JNI \\ ffmpeg的-的Andr​​oid \\编译\\ ffmpeg的\\ armeabi \\ lib中文件夹,然后运行

To make this all work easily on Windows, I suggest to go to the jni\ffmpeg-android\build\ffmpeg\armeabi\lib folder, and run

del *.so
copy libavcodec.so.52.99.1 libavcodec.so
copy libavcore.so.0.16.0 libavcore.so
copy libavdevice.so.52.2.2 libavdevice.so
copy libavfilter.so.1.69.0 libavfilter.so
copy libavformat.so.52.88.0 libavformat.so
copy libavutil.so.50.34.0 libavutil.so
copy libswscale.so.0.12.0 libswscale.so