Android jni“没有规则让目标问题”

时间:2012-07-19 07:21:50

标签: android ffmpeg java-native-interface

我正在尝试编译我从下面链接获得的项目。 Github project fmpeg. 但是在编译使用andriod ndk版本5创建.so文件时,我遇到了以下问题。请指教我解决它。

make: *** No rule to make target `/cygdrive/D/Shakthi/jhotovy/jhotovy-android-ffmpeg-fab1412/Project/jni/ffmpeg/ffmpeg.c', needed by `/cygdrive/D/Shakthi/jhotovy/jhotovy-android-ffmpeg-fab1412/Project/obj/local/armeabi/objs/ffmpeg/ffmpeg/ffmpeg.o'.  Stop.

我的Android.mk文件代码。

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE  := ffmpeg

FFMPEG_LIBS := $(addprefix ffmpeg/, \
 libavdevice/libavdevice.a \
 libavformat/libavformat.a \
 libavcodec/libavcodec.a \
 libavfilter/libavfilter.a \
 libswscale/libswscale.a \
 libavutil/libavutil.a \
 libpostproc/libpostproc.a )

OGG_LIBS := $(addprefix libogg/output/lib/, \
 libogg.a )

VORBIS_LIBS := $(addprefix libvorbis/output/lib/, \
 libvorbis.a \
 libvorbisenc.a \
 libvorbisfile.a )

THEORA_LIBS := $(addprefix libtheora/output/lib/, \
 libtheora.a \
 libtheoraenc.a \
 libtheoradec.a )

LOCAL_CFLAGS += -g -Iffmpeg -Ivideokit -Wno-deprecated-declarations 
LOCAL_LDLIBS += -llog -lz $(FFMPEG_LIBS) $(THEORA_LIBS) $(OGG_LIBS) x264/libx264.a
LOCAL_SRC_FILES := ffmpeg_android/ffmpeg_android.c ffmpeg/ffmpeg.c ffmpeg/cmdutils.c

include $(BUILD_SHARED_LIBRARY)

# Use to safely invoke ffmpeg multiple times from the same Activity
include $(CLEAR_VARS)

LOCAL_MODULE := ffmpeginvoke

LOCAL_SRC_FILES := ffmpeg_invoke/ffmpeg_invoke.c
LOCAL_LDLIBS    := -ldl

include $(BUILD_SHARED_LIBRARY)

1 个答案:

答案 0 :(得分:0)

您是否按照"How to build it"中的说明操作了?