【问题标题】:Build VLC for Android project failed on Ubuntu 12.04在 Ubuntu 12.04 上为 Android 项目构建 VLC 失败
【发布时间】:2015-07-27 08:37:16
【问题描述】:

我想从事 VLC for Android 项目。所以首先我需要编译这个项目,我按照https://wiki.videolan.org/AndroidCompile/ 上的所有步骤操作,但是当我最后执行sh compile.sh -a armeabi-v7a 时,我遇到了这个错误:

contribs: make failed

Error:Execution failed for task ':libvlc:buildDebugARMv5'. > Process 'command './compile-libvlc.sh'' finished with non-zero exit value 1

我正在使用 Android Studio。

更新

所以我下载了一个 ubuntu 12.04 vm,并在上面构建了 VLC android 项目。出现了同样的错误,但它也告诉我我的 gettext 太旧了,它应该是 0.19.1 或更高版本。 所以我退出了虚拟机,在我的真机上检查了我的gettext版本(0.18.4),我把gettext更新了,它知道0.19.4版本。

我构建了项目,contribs: make failed 错误消失了,但这是知道新错误:

FAILURE: Build failed with an exception.

* Where:
Build file '/home/edouard/3DSoundLabs/android/android/build.gradle' line: 16

* What went wrong:
A problem occurred evaluating root project 'android'.
> Failed to apply plugin [id 'android-sdk-manager']
> Specified SDK directory './3DSoundLabs/android/android-sdk-linux/' in 'local.properties' is not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

这是我的 local.properties,它似乎很好,我不明白

local.properties:

sdk.dir=./3DSoundLabs/android/android-sdk-linux/
ndk.dir=./3DSoundLabs/android/android-ndk-r10e/

已解决!!

好的,所以对于第二个错误,这只是路径问题,我的错。 更正: sdk.dir=../android-sdk-linux/ ndk.dir=../android-ndk-r10e/

所以主要错误是我的gettext版本太旧了,我在开始时没有找到它,因为日志没有告诉这个问题。

【问题讨论】:

    标签: android ubuntu android-studio compilation vlc


    【解决方案1】:

    你没有提到你使用的是哪个位版本的 Ubuntu,VLC AndroidComile wiki 说

    这些工具的最新版本。

    所以我继续在 64 位 Ubuntu 14.04 上进行测试。

    这就是我所做的

    安装的最低要求包:

    sudo apt-get update
    sudo apt-get install ant autoconf automake autopoint cmake gawk gcc g++ libtool m4 patch pkg-config libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler ragel subversion unzip
    

    导航到 VLC Android 目录并运行:

    ./compile.sh 
    *** No ANDROID_ABI defined architecture: using ARMv7
    inflating: ...
    ...
    
    :wrapper
    
    BUILD SUCCESSFUL
    
    Total time: 4.992 secs
    Downloading https://services.gradle.org/distributions/gradle-2.2.1-bin.zip
    ...........................................................................
    Unzipping /home/<user>/.gradle/wrapper/dists/gradle-2.2.1-bin/88n1whbyjvxg3s40jzz5ur27/gradle-2.2.1-bin.zip to /home/<user>/.gradle/wrapper/dists/gradle-2.2.1-bin/88n1whbyjvxg3s40jzz5ur27
    Set executable permissions for: /home/<user>/.gradle/wrapper/dists/gradle-2.2.1-bin/88n1whbyjvxg3s40jzz5ur27/gradle-2.2.1/bin/gradle
    
    ------------------------------------------------------------
    Gradle 2.2.1
    ------------------------------------------------------------
    
    Build time:   2014-11-24 09:45:35 UTC
    Build number: none
    Revision:     6fcb59c06f43a4e6b1bcb401f7686a8601a1fb4a
    
    Groovy:       2.3.6
    Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
    JVM:          1.7.0_80 (Oracle Corporation 24.80-b11)
    OS:           Linux 3.13.0-53-generic amd64
    
    VLC source not found, cloning
    Cloning into 'vlc'...
    
    VLC source found
    Configuring
    Lots of configuration and make logs
    ...
    
    make[1]: Leaving directory `/<...>/vlc/android/vlc/extras/tools/cmake'
    touch .cmake
    You are ready to build VLC and its contribs
    Bootstraping
    NOTE: GNU gettext appears to be missing or out-of-date.
    Please install or update GNU gettext.
    Also check if you have cvs, a dependency of autopoint.
    Otherwise, you will not be able to build a source tarball.
    ==============================================================
    
    generating modules/**/Makefile.am
    .....
    + autoreconf --install --force --verbose -I m4
    autoreconf: Entering directory `.'
    autoreconf: running: true --force
    ....
    
    bin/Makefile.am: installing 'autotools/depcomp'
    autoreconf: Leaving directory `.'
    + rm -f po/Makevars.template
    + rm -f stamp-h*
    + set +x
    Successfully bootstrapped
    Building the contribs
    Generating EGL pkg-config file
    Generating GLESv2 pkg-config file
    Guessing build system... x86_64-linux-gnu
    Creating configuration file... config.mak
    Bootstrap completed.
    
    Run "make" to start compilation.
    
    Other targets:
     * make install      same as "make"
     * make prebuilt     fetch and install prebuilt binaries
     * make list         list packages
     * make fetch        fetch required source tarballs
     * make fetch-all    fetch all source tarballs
     * make distclean    clean everything and undo bootstrap
     * make mostlyclean  clean everything except source tarballs
     * make clean        clean everything
     * make package      prepare prebuilt packages
    curl -f -L -- "http://downloads.videolan.org/pub/contrib/a52dec-0.7.4.tar.gz" > "../../contrib/tarballs/a52dec-0.7.4.tar.gz"
    Lots of fetching and cloning
    ...
    
    Lots of configuration and make logs
    ...
    
    Libraries have been installed in:
    /<...>/vlc/android/vlc/contrib/arm-linux-androideabi/lib
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the `LD_RUN_PATH' environment variable
         during linking
       - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
    make[4]: Leaving directory `/<...>/vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/gmp'
    make[3]: Leaving directory `/<...>/vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/gmp'
    make[2]: Leaving directory `/<...>/vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/gmp'
    make[1]: Leaving directory `/<...>/vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/gmp'
    touch .gmp
    contribs: make failed
    

    make 一直失败,但每次使用不同的库时,我不得不多次重复 ./compile.sh 命令。但是在 zvbi 出现类似错误之后

    make[4]: Leaving directory `/<...>/vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/zvbi'
    make[3]: Leaving directory `/<...>/vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/zvbi'
    make[2]: Leaving directory `/<...>/vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/zvbi'
    make[1]: Leaving directory `/<...>/vlc/android/vlc/contrib/contrib-android-arm-linux-androideabi/zvbi'
    touch .zvbi
    contribs: make failed
    

    这次出现了不同的错误信息:

    mkdir -p -- /<...>/vlc/android/vlc/contrib/arm-linux-androideabi/share/aclocal && cd libgpg-error && autoreconf -fiv -I/<...>/vlc/android/vlc/contrib/arm-linux-androideabi/share/aclocal
    autoreconf: Entering directory `.'
    autoreconf: running: autopoint --force
    autopoint: *** The AM_GNU_GETTEXT_VERSION declaration in your configure.ac
                   file requires the infrastructure from gettext-0.19.3 but this version
                   is older. Please upgrade to gettext-0.19.3 or newer.
    autopoint: *** Stop.
    autoreconf: autopoint failed with exit status: 1
    make: *** [.gpg-error] Error 1
    contribs: make failed
    
    $ gettext --version
    gettext (GNU gettext-runtime) 0.18.3
    

    在撰写本文时,即使 vivid (v0.19.2-2) 也没有那么高级别的 gettext。所以,我作弊并手动降级所需的gettext版本到0.18:

    $ grep --include=configure.ac -rn AM_GNU_GETTEXT_VERSION .
    ./vlc/configure.ac:439:AM_GNU_GETTEXT_VERSION([0.19.2])
    ./vlc/contrib/contrib-android-arm-linux-androideabi/gnutls/configure.ac:148:AM_GNU_GETTEXT_VERSION([0.18])
    ./vlc/contrib/contrib-android-arm-linux-androideabi/libgpg-error/configure.ac:158:AM_GNU_GETTEXT_VERSION([0.19.3])
    

    还有一个./compile.sh 和宾果游戏:

    [armeabi-v7a] SharedLibrary  : libvlcjni.so
    [armeabi-v7a] Install        : libvlcjni.so => libs/armeabi-v7a/libvlcjni.so
    rm jni/../../android-libs/libbinder.c jni/../../android-libs/libui.c jni/../../android-libs/libutils.c jni/../../android-libs/libstagefright.c jni/../../android-libs/libcutils.c jni/../../android-libs/libhardware.c jni/../../android-libs/libmedia.c
    make: Leaving directory `/<...>/vlc/android/libvlc'
    Download https://jcenter.bintray.com/com/android/tools/build/gradle/1.2.1/gradle-1.2.1.pom
    ...
    > Configuring > 0/3 projects > root project
    

    但后来它永远挂在那里(可能是因为代理配置中的冲突)。 ps x透露:

    /bin/sh ./compile.sh
    java -Dorg.gradle.appname=gradlew -classpath /<...>/vlc/android/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain assembleVanillaARMv7Debug
    

    所以,我决定取消 Ctrl+C ./compile.sh 并尝试将项目导入 Android Studio。 启动 AS 并选择“Open an existing Android Studio project”。 AS 还从 jcenter 和 bingo 获取了一些包(这次是真的)!

    Information:Gradle tasks [:libvlc:generateDebugSources, :libvlc:generateDebugAndroidTestSources, :vlc-android:generateChromeARMv5DebugSources, :vlc-android:generateChromeARMv5DebugAndroidTestSources]
    :libvlc:preBuild UP-TO-DATE
    :libvlc:preDebugBuild UP-TO-DATE
    :libvlc:checkDebugManifest
    :libvlc:prepareDebugDependencies
    :libvlc:compileDebugAidl
    :libvlc:compileDebugRenderscript
    :libvlc:generateDebugBuildConfig
    :libvlc:generateDebugAssets UP-TO-DATE
    :libvlc:mergeDebugAssets
    :libvlc:generateDebugResValues
    :libvlc:generateDebugResources
    :libvlc:packageDebugResources
    :libvlc:processDebugManifest
    :libvlc:processDebugResources
    :libvlc:generateDebugSources
    :libvlc:preDebugAndroidTestBuild UP-TO-DATE
    :libvlc:prepareDebugAndroidTestDependencies
    :libvlc:compileDebugAndroidTestAidl
    :libvlc:compileLint
    :libvlc:copyDebugLint UP-TO-DATE
    :libvlc:mergeDebugProguardFiles
    :libvlc:processDebugJavaRes UP-TO-DATE
    :libvlc:compileDebugJava
    Note: /<...>/vlc/android/libvlc/src/org/videolan/libvlc/LibVlcUtil.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: /<...>/vlc/android/libvlc/src/org/videolan/libvlc/VLCObject.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    :libvlc:packageDebugJar
    :libvlc:compileDebugNdk UP-TO-DATE
    :libvlc:packageDebugJniLibs
    :libvlc:packageDebugLocalJar UP-TO-DATE
    :libvlc:packageDebugRenderscript UP-TO-DATE
    :libvlc:bundleDebug
    :libvlc:compileDebugSources
    :libvlc:assembleDebug
    :libvlc:processDebugAndroidTestManifest
    :libvlc:compileDebugAndroidTestRenderscript
    :libvlc:generateDebugAndroidTestBuildConfig
    :libvlc:generateDebugAndroidTestAssets UP-TO-DATE
    :libvlc:mergeDebugAndroidTestAssets
    :libvlc:generateDebugAndroidTestResValues
    :libvlc:generateDebugAndroidTestResources
    :libvlc:mergeDebugAndroidTestResources
    :libvlc:processDebugAndroidTestResources
    :libvlc:generateDebugAndroidTestSources
    :vlc-android:preBuild UP-TO-DATE
    :vlc-android:preChromeARMv5DebugBuild UP-TO-DATE
    :vlc-android:checkChromeARMv5DebugManifest
    :libvlc:copyReleaseLint UP-TO-DATE
    :libvlc:mergeReleaseProguardFiles
    :libvlc:preReleaseBuild UP-TO-DATE
    :libvlc:checkReleaseManifest
    :libvlc:prepareReleaseDependencies
    :libvlc:compileReleaseAidl
    :libvlc:compileReleaseRenderscript
    :libvlc:generateReleaseBuildConfig
    :libvlc:generateReleaseAssets UP-TO-DATE
    :libvlc:mergeReleaseAssets
    :libvlc:generateReleaseResValues
    :libvlc:generateReleaseResources
    :libvlc:packageReleaseResources
    :libvlc:processReleaseManifest
    :libvlc:processReleaseResources
    :libvlc:generateReleaseSources
    :libvlc:processReleaseJavaRes UP-TO-DATE
    :libvlc:compileReleaseJava
    Note: /<...>/vlc/android/libvlc/src/org/videolan/libvlc/LibVlcUtil.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: /<...>/vlc/android/libvlc/src/org/videolan/libvlc/VLCObject.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    :libvlc:packageReleaseJar
    :libvlc:compileReleaseNdk UP-TO-DATE
    :libvlc:packageReleaseJniLibs
    :libvlc:packageReleaseLocalJar UP-TO-DATE
    :libvlc:packageReleaseRenderscript UP-TO-DATE
    :libvlc:bundleRelease
    :vlc-android:preChromeARMv5ReleaseBuild UP-TO-DATE
    :vlc-android:preChromeARMv6fpuDebugBuild UP-TO-DATE
    :vlc-android:preChromeARMv6fpuReleaseBuild UP-TO-DATE
    :vlc-android:preChromeARMv6nofpuDebugBuild UP-TO-DATE
    :vlc-android:preChromeARMv6nofpuReleaseBuild UP-TO-DATE
    :vlc-android:preChromeARMv7DebugBuild UP-TO-DATE
    :vlc-android:preChromeARMv7ReleaseBuild UP-TO-DATE
    :vlc-android:preChromeARMv8DebugBuild UP-TO-DATE
    :vlc-android:preChromeARMv8ReleaseBuild UP-TO-DATE
    :vlc-android:preChromeMIPS64DebugBuild UP-TO-DATE
    :vlc-android:preChromeMIPS64ReleaseBuild UP-TO-DATE
    :vlc-android:preChromeMIPSDebugBuild UP-TO-DATE
    :vlc-android:preChromeMIPSReleaseBuild UP-TO-DATE
    :vlc-android:preChromeX86DebugBuild UP-TO-DATE
    :vlc-android:preChromeX86ReleaseBuild UP-TO-DATE
    :vlc-android:preChromeX86_64DebugBuild UP-TO-DATE
    :vlc-android:preChromeX86_64ReleaseBuild UP-TO-DATE
    :vlc-android:preTvARMv5DebugBuild UP-TO-DATE
    :vlc-android:preTvARMv5ReleaseBuild UP-TO-DATE
    :vlc-android:preTvARMv6fpuDebugBuild UP-TO-DATE
    :vlc-android:preTvARMv6fpuReleaseBuild UP-TO-DATE
    :vlc-android:preTvARMv6nofpuDebugBuild UP-TO-DATE
    :vlc-android:preTvARMv6nofpuReleaseBuild UP-TO-DATE
    :vlc-android:preTvARMv7DebugBuild UP-TO-DATE
    :vlc-android:preTvARMv7ReleaseBuild UP-TO-DATE
    :vlc-android:preTvARMv8DebugBuild UP-TO-DATE
    :vlc-android:preTvARMv8ReleaseBuild UP-TO-DATE
    :vlc-android:preTvMIPS64DebugBuild UP-TO-DATE
    :vlc-android:preTvMIPS64ReleaseBuild UP-TO-DATE
    :vlc-android:preTvMIPSDebugBuild UP-TO-DATE
    :vlc-android:preTvMIPSReleaseBuild UP-TO-DATE
    :vlc-android:preTvX86DebugBuild UP-TO-DATE
    :vlc-android:preTvX86ReleaseBuild UP-TO-DATE
    :vlc-android:preTvX86_64DebugBuild UP-TO-DATE
    :vlc-android:preTvX86_64ReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaARMv5DebugBuild UP-TO-DATE
    :vlc-android:preVanillaARMv5ReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaARMv6fpuDebugBuild UP-TO-DATE
    :vlc-android:preVanillaARMv6fpuReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaARMv6nofpuDebugBuild UP-TO-DATE
    :vlc-android:preVanillaARMv6nofpuReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaARMv7DebugBuild UP-TO-DATE
    :vlc-android:preVanillaARMv7ReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaARMv8DebugBuild UP-TO-DATE
    :vlc-android:preVanillaARMv8ReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaMIPS64DebugBuild UP-TO-DATE
    :vlc-android:preVanillaMIPS64ReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaMIPSDebugBuild UP-TO-DATE
    :vlc-android:preVanillaMIPSReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaX86DebugBuild UP-TO-DATE
    :vlc-android:preVanillaX86ReleaseBuild UP-TO-DATE
    :vlc-android:preVanillaX86_64DebugBuild UP-TO-DATE
    :vlc-android:preVanillaX86_64ReleaseBuild UP-TO-DATE
    :vlc-android:prepareAndroidLibvlcUnspecifiedLibrary
    :vlc-android:prepareComAndroidSupportAppcompatV72211Library
    :vlc-android:prepareComAndroidSupportCardviewV72211Library
    :vlc-android:prepareComAndroidSupportRecyclerviewV72211Library
    :vlc-android:prepareComAndroidSupportSupportV42211Library
    :vlc-android:prepareChromeARMv5DebugDependencies
    :vlc-android:compileChromeARMv5DebugAidl
    :vlc-android:compileChromeARMv5DebugRenderscript
    :vlc-android:generateChromeARMv5DebugBuildConfig
    :vlc-android:generateChromeARMv5DebugAssets UP-TO-DATE
    :vlc-android:mergeChromeARMv5DebugAssets
    :vlc-android:generateChromeARMv5DebugResValues
    :vlc-android:generateChromeARMv5DebugResources
    :vlc-android:mergeChromeARMv5DebugResources
    :vlc-android:processChromeARMv5DebugManifest
    :vlc-android:processChromeARMv5DebugResources
    warning: string 'advanced_debugging' has no default translation.
    warning: string 'beta_warning' has no default translation.
    warning: string 'enable_iomx' has no default translation.
    warning: string 'enable_wheel_bar' has no default translation.
    warning: string 'filebrowser_title' has no default translation.
    warning: string 'main_prefs_category' has no default translation.
    warning: string 'new_app' has no default translation.
    warning: string 'new_app_go' has no default translation.
    warning: string 'new_app_msg' has no default translation.
    :vlc-android:generateChromeARMv5DebugSources
    :vlc-android:preChromeARMv5DebugAndroidTestBuild UP-TO-DATE
    :vlc-android:prepareChromeARMv5DebugAndroidTestDependencies
    :vlc-android:compileChromeARMv5DebugAndroidTestAidl
    :vlc-android:processChromeARMv5DebugAndroidTestManifest
    :vlc-android:compileChromeARMv5DebugAndroidTestRenderscript
    :vlc-android:generateChromeARMv5DebugAndroidTestBuildConfig
    :vlc-android:generateChromeARMv5DebugAndroidTestAssets UP-TO-DATE
    :vlc-android:mergeChromeARMv5DebugAndroidTestAssets
    :vlc-android:generateChromeARMv5DebugAndroidTestResValues
    :vlc-android:generateChromeARMv5DebugAndroidTestResources
    :vlc-android:mergeChromeARMv5DebugAndroidTestResources
    :vlc-android:processChromeARMv5DebugAndroidTestResources
    :vlc-android:generateChromeARMv5DebugAndroidTestSources
    Information:BUILD SUCCESSFUL
    Information:Total time: 22.922 secs
    Information:0 errors
    Information:0 warnings
    Information:See complete output in console
    

    按下 Shift+F10 和:

    Uploading file
    local path: /<...>/vlc/android/vlc-android/build/outputs/apk/VLC-Android-CHROME-1.4.0-ARMv5.apk
    remote path: /data/local/tmp/org.videolan.vlc.debug
    Installing org.videolan.vlc.debug
    DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/org.videolan.vlc.debug"
    pkg: /data/local/tmp/org.videolan.vlc.debug
    Success
    
    Launching application: org.videolan.vlc.debug/org.videolan.vlc.gui.MainActivity.
    DEVICE SHELL COMMAND: am start -n "org.videolan.vlc.debug/org.videolan.vlc.gui.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
    Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=org.videolan.vlc.debug/org.videolan.vlc.gui.MainActivity }
    

    我把丰富的信息和日志放在这里,希望对其他人有所帮助。

    【讨论】:

    • 对于感兴趣的人:OP 中提到的 AndroidCompile wiki 还说“请注意,当前 Ubuntu 的最低版本是 15.10 (Wily Werewolf),至少对于最新的 gettext。 '。但在撰写本文时,15.10 只是一个 alpha 版本。所以除非你想运行一些开发版本的 Ubuntu:降级是唯一的选择。
    • 我正在开发 Ubuntu 14.04,如前所述,我将 AM_GNU_GETTEXT_VERSION 从 [0.19.3] 更改为 [0.18]。我能够使用 ./compile.sh 编译我的项目,但是,在 Android Studio 中通过 gradle 构建项目时,我收到以下错误 - Error:Execution failed for task ':libvlc:buildDebugARMv5'. &gt; java.lang.NullPointerException (no error message)
    • 在我看来,解决 gettext 过时版本问题的更好方法是自己编译最新版本。你可以在这里获取源代码ftp.gnu.org/pub/gnu/gettext
    • @yadav_vi:这似乎是与 AS 相关的问题,请尝试重新启动它或以其他方式了解导致 NPE 的确切原因。
    【解决方案2】:

    在 64 位 Ubuntu 15.04 (Vivid) 上构建成功,无需使用 Android Studio。只需更改此行:

    来自

    AM_GNU_GETTEXT_VERSION([0.19.3])
    

    AM_GNU_GETTEXT_VERSION([0.19.2])
    

    ./vlc/contrib/contrib-android-arm-linux-androideabi/libgpg-error/configure.ac
    

    失败后:

    make: *** [.gpg-error] Error 1
    contribs: make failed
    

    按照建议:ozbek。

    【讨论】:

      【解决方案3】:

      我被困在:

      贡献:失败

      我找到了another guide,它帮助我让这个构建正常工作。

      为我完成的部分是 protobuf3 的下载和安装。一旦我这样做了,vlc 就会为我构建。

      这是教程中的 sn-p,它使一切正常

      下载:

      https://github.com/google/protobuf/releases/download/v3.1.0/protobuf-cpp-3.1.0.tar.gz
      

      然后做:

      sudo tar zxvf ./protobuf-cpp-3.1.0.tar.gz    # decompression
      cd ./protobuf-3.1.0/    # Extracted folder 
      ./configure    # Run configure 
      make
      make check
      sudo make install
      make clean
      sudo ldconfig  # Update shared  library cache
      

      在此之后,运行:

      ./compile.sh
      

      工作正常。

      自从我在 Ubuntu 16.04 上进行上述尝试后,我已经在 Ubuntu 14.04 上重建了 libvlc,我注意到这并没有解决我在 Ubuntu 14.04 上的问题。一旦我创建了另一个 Ubuntu 16.04 虚拟机,这似乎可以解决问题。

      我认为这也与 gettext 程序有关。 Libvlc 可能需要仅在 16.04 上可用的 gettext 版本。

      【讨论】:

        【解决方案4】:

        构建 VLC 播放器是一项非常复杂的任务,需要花费大量时间。您遇到的错误只是您尝试修复的众多错误中的第一个。

        我会向您建议一个简单的方法 - 不要自己构建 VLC。主要想法是 - 如果您不想修改 VLC 源,那么从原始 VLC.apk 获取 .so 文件(您可以解压缩 apk)并从项目中的 vlc sources 复制 org.videolan.libvlc.* 文件就足够了。

        您可以查看this project 了解它的工作原理。

        【讨论】:

        • 那么问题是我想修改 de VLC 源以添加蓝牙功能(我的项目)所以我需要先构建它:/
        • @leykan 你需要修改java或c++代码吗?如果您想修改 C++ 部分 - 我的回答不是一个选项,但如果您只想修改 java 代码,您可以使用我的方法来加快您的开发过程
        【解决方案5】:

        经过四天的新年假期,我找到了构建这个项目的方法。 感谢 ozbek 和所有帮助。

        1. 我再次安装 ubuntu 15.10 并从 https://github.com/hieu19926/vlc 克隆它 因为我无法从源站克隆。

        2. 按照 vlc 的 wiki 构建,并按照上面的 ozbek。

        3. 可能会出现 curl 错误,如下:curl Failed to connect to localhost port 80 或:https://github.com/rvm/rvm/issues/2989
          也就是说:$echo ip4 &gt;&gt; ~/.curlrc
          并注销,重新登录。

        4. 在第2步之后,如果你看到contrib的错误,如果是iconv错误,只需在文件中编辑:$vi vlc/contrib/src/iconv/rules.mak 第 26 行:注释掉这一行:

        $(APPLY) $(SRC)/iconv/libiconv-android-ios.patch

        并重建,它会比以前运行更长的时间并且成功

        现在继续寻找如何将libvlc导入到android studio T_T,有谁记得编译成功后安装一些lib,请在此评论或发帖给大家,谢谢!

        【讨论】:

          猜你喜欢
          • 2017-02-07
          • 1970-01-01
          • 1970-01-01
          • 2014-04-25
          • 2013-05-27
          • 2020-03-16
          • 1970-01-01
          • 1970-01-01
          • 2013-01-26
          相关资源
          最近更新 更多