您的位置:首页 > 移动开发 > Android开发

Plumble-android 一次完整的编译过程(Opus语音压缩项目)

2017-05-09 16:53 525 查看
前言:Opus可以实现1kyte/s的压缩语音传输,过瘾!

Plumble-android 一次完整的编译过程 NDK

标签:Plumble android mumble Jumble opus speex celt talkiewalkie 

作者:BI7JTA

时间:2017-5-9

碰到的问题:

源码来自:https://wiki.mumble.info/wiki/Main_Page

1、缺少方法 error: use of undeclared identifier 'celt_mode_info'

分析思路:项目里查找celt_mode_info ,发现celt-0.11.0 不存在此方法,而celt-0.7 存在,去官方github发现已停止维护

解决方法:屏蔽 Jumble/src/main/jni/Android.mk 的编译so声明,即不使用11版本,成功通过;

include $(CLEAR_VARS)

LOCAL_PATH := $(ROOT)/celt-0.11.0-src/libcelt

LOCAL_MODULE := jnicelt11

LOCAL_SRC_FILES := bands.c celt.c cwrs.c entcode.c entdec.c entenc.c header.c kiss_fft.c \

                       laplace.c mathops.c mdct.c modes.c pitch.c plc.c quant_bands.c rate.c vq.c \

                       $(ROOT)/jnicelt11.cpp

LOCAL_C_INCLUDES    := $(ROOT)/celt-0.11.0-src/libcelt/

LOCAL_CFLAGS := -I$(ROOT)/celt-0.11.0-build -DHAVE_CONFIG_H -fvisibility=hidden

LOCAL_CPP_FEATURES := exceptions

LOCAL_LDLIBS := -llog

include $(BUILD_SHARED_LIBRARY)

2、用了最新的opus-1.1.2 编译提示错误,这个版本在iOS上可以通过,但在Android脚本上不行,按照Jumble源码的link,下载v1.1  …

 65471dd 即可编译通过

3、armeabi build的错误日志没拷贝,切记修改ndk版本为 r13b以下,高版本不能编译!

   编译 项目 talkiewalkie 一样的问题。

三个地方:

1)local.properties: ndk.dir=/work_tools/android-ndk-r13b

2) jnigen.h: /work_tools/android-ndk-r13b/ndk-build -C src/main/jni

3) build.gradle:  commandLine '/work_tools/android-ndk-r13b/ndk-build', '-C', file('src/main/jni/').absolutePath

另外后面两个文件要用全路径,默认是不带全路径的,不改我的编译会报错。我用 MAC系统,应该是系统变量没设置。

其他:

1)Error:Configuration with name 'default' not found.自行google找解决方法

2)多语言文件编译错误,不影响;

3) gradle project sync failed. please fix your project and try again 自行google找解决方法

好了,觉得解决你问题的话,记得打赏我的支付宝:huanghr.1@gmail.com

或者获得更多付费支持,协助你解决问题的过程本身就是为你创造价值。

多用Google,多思考,天无绝人之路。

以下是日志:

Executing tasks: [assemble]

。。。

"certificatePasswordSum" is translated here but not found in default locale [ExtraTranslation]

  <string name="certificatePasswordSum">Das Passwort für Ihr PKCS12 Zertifikat. (Optional)</string>

          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    /work_studio/mumbleServer/Plumble-android/app/src/main/res/values-es/preference.xml:31: Also translated here

    /work_studio/mumbleServer/Plumble-android/app/src/main/res/values-fr/preference.xml:31: Also translated here

    /work_studio/mumbleServer/Plumble-android/app/src/main/res/values-ja/preference.xml:31: Also translated here

    /work_studio/mumbleServer/Plumble-android/app/src/main/res/values-nl/preference.xml:31: Also translated here

    /work_studio/mumbleServer/Plumble-android/app/src/main/res/values-pl/preference.xml:13: Also translated here

    /work_studio/mumbleServer/Plumble-android/app/src/main/res/values-ru/preference.xml:31: Also translated here

   Explanation for issues of type "ExtraTranslation":

   If a string appears in a specific language translation file, but there is

   no corresponding string in the default locale, then this string is probably

   unused. (It's technically possible that your application is only intended

   to run in a specific locale, but it's still a good idea to provide a

   fallback.).

   Note that these strings can lead to crashes if the string is looked up on

   any locale not providing a translation, so it's important to clean them

   up.

350 errors, 0 warnings

:app:mergeOfficialReleaseShaders

:app:compileOfficialReleaseShaders

:app:generateOfficialReleaseAssets

:app:mergeOfficialReleaseAssets

:app:transformClassesWithDexForOfficialRelease

:app:mergeOfficialReleaseJniLibFolders

:app:transformNative_libsWithMergeJniLibsForOfficialRelease

:app:transformNative_libsWithStripDebugSymbolForOfficialRelease

:app:processOfficialReleaseJavaRes UP-TO-DATE

:app:transformResourcesWithMergeJavaResForOfficialRelease

:app:packageOfficialRelease

:app:assembleOfficialRelease

:app:assembleRelease

:app:assemble

:libraries:Jumble:checkDebugManifest

:libraries:Jumble:prepareDebugDependencies

:libraries:Jumble:compileDebugAidl

:libraries:Jumble:compileDebugNdk UP-TO-DATE

:libraries:Jumble:copyDebugLint UP-TO-DATE

:libraries:Jumble:compileDebugRenderscript

:libraries:Jumble:generateDebugBuildConfig

:libraries:Jumble:generateDebugResValues

:libraries:Jumble:generateDebugResources

:libraries:Jumble:mergeDebugResources

:libraries:Jumble:processDebugManifest

:libraries:Jumble:processDebugResources

:libraries:Jumble:generateDebugSources

:libraries:Jumble:incrementalDebugJavaCompilationSafeguard

:libraries:Jumble:compileDebugJavaWithJavac

:libraries:Jumble:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

注: 某些输入文件使用或覆盖了已过时的 API。

注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。

:libraries:Jumble:extractDebugAnnotations

:libraries:Jumble:mergeDebugShaders

:libraries:Jumble:compileDebugShaders

:libraries:Jumble:generateDebugAssets

:libraries:Jumble:mergeDebugAssets

:libraries:Jumble:mergeDebugProguardFiles

:libraries:Jumble:packageDebugRenderscript UP-TO-DATE

:libraries:Jumble:packageDebugResources

:libraries:Jumble:processDebugJavaRes UP-TO-DATE

:libraries:Jumble:transformResourcesWithMergeJavaResForDebug

:libraries:Jumble:transformClassesAndResourcesWithSyncLibJarsForDebug

:libraries:Jumble:mergeDebugJniLibFolders

:libraries:Jumble:transformNative_libsWithMergeJniLibsForDebug

:libraries:Jumble:transformNative_libsWithSyncJniLibsForDebug

:libraries:Jumble:bundleDebug

:libraries:Jumble:compileDebugSources

:libraries:Jumble:assembleDebug

:libraries:Jumble:compileReleaseSources

:libraries:Jumble:assembleRelease

:libraries:Jumble:assemble

BUILD SUCCESSFUL

Total time: 7 mins 4.779 secs



欢迎加智能硬件APP[iOS/Android/Arduino]开发Q群进行交流:217346828 ,加入请备注来自 博客文章
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息