Android Studio (editor) cannot see Gst header files

jeremi.wojcicki jeremi.wojcicki at gmail.com
Tue May 23 17:26:13 UTC 2017


In the end I solved the problem myself. So if sb would have similar issue in
the future I post my solution.

It was needed to modify the makefile (Android.mk) and add locations of
missed libs into LOCAL_C_INCLUDES before include $(BUILD_SHARED_LIBRARY) was
built. Here is my entire Android.mk:


ifndef GSTREAMER_ROOT_ANDROID
$(error GSTREAMER_ROOT_ANDROID is not defined!)
endif

ifeq ($(TARGET_ARCH_ABI),armeabi)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/arm
else ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/armv7
else ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/arm64
else ifeq ($(TARGET_ARCH_ABI),x86)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/x86
else ifeq ($(TARGET_ARCH_ABI),x86_64)
GSTREAMER_ROOT        := $(GSTREAMER_ROOT_ANDROID)/x86_64
else
$(error Target arch ABI not supported: $(TARGET_ARCH_ABI))
endif

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := tutorial-3
LOCAL_SRC_FILES := tutorial-3.c
LOCAL_SHARED_LIBRARIES := gstreamer_android
LOCAL_LDLIBS := -llog -landroid

# my addition to fix Android Studio complaints about dependencies

LOCAL_C_INCLUDES := $(GSTREAMER_ROOT)/include
LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/gstreamer-1.0
LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/include/glib-2.0
LOCAL_C_INCLUDES += $(GSTREAMER_ROOT)/lib/glib-2.0/include

include $(BUILD_SHARED_LIBRARY)

GSTREAMER_NDK_BUILD_PATH  := $(GSTREAMER_ROOT)/share/gst-android/ndk-build/
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE)
$(GSTREAMER_PLUGINS_SYS) $(GSTREAMER_PLUGINS_EFFECTS)
GSTREAMER_EXTRA_DEPS      := gstreamer-video-1.0
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Android-Studio-editor-cannot-see-Gst-header-files-tp4683068p4683083.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list