gpt4 book ai didi

java - 错误: undefined reference to 'libiconv_close' in Ndk Android Studio

转载 作者:行者123 更新时间:2023-12-01 22:19:56 25 4
gpt4 key购买 nike

我在 android studio 中为 gstreamer 库设置 ndk 时遇到错误。

下面是我收到的错误-:

cerbero.git/1.16/build/sources/android_universal/armv7/glib-2.56.1/_builddir/../glib/gconvert.c:308:错误:未定义对“libiconv_close”的引用

我的项目级别 gradle 是 -:

> buildscript {
> repositories {
> jcenter()
> google()
> }
> dependencies {
> classpath 'com.android.tools.build:gradle:3.5.0'
> } }
>
> allprojects {
> repositories {
> jcenter()
> google()
> } }

我的 app.gradle 是 -:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.0"

defaultConfig {
applicationId "org.freedesktop.gstreamer.tutorials.tutorial_2"
minSdkVersion 9
targetSdkVersion 26

ndk {
moduleName "tutorial-2"
abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a'
}
}

buildTypes {
release {

minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
externalNativeBuild {
ndkBuild {
path '../../gstreamer-tutorial2/app/src/main/jni/Android.mk'
}
}
}

我使用的引用资料来自-:

Gstreamer examples in Android Studio

任何人都可以帮助提供在 android studio 中实现 gstream 库的良好引用

谢谢

最佳答案

尝试将 libiconv 添加到您的 Android.mk 文件

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_NET) x264 openh264 videoparsersbad mulaw
G_IO_MODULES := gnutls
GSTREAMER_EXTRA_LIBS := -liconv #This is what you need
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk

关于java - 错误: undefined reference to 'libiconv_close' in Ndk Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58598674/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com