日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

vlc android 编译 mac,在Mac中编译vlc-android小结

發布時間:2025/4/5 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vlc android 编译 mac,在Mac中编译vlc-android小结 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在Mac中編譯vlc-android小結

在Mac中編譯vlc-android小結

VLC ?CodeSource

https://code.videolan.org/explore

This page is an introduction to the compilation of VLC for Android on Linux.

https://wiki.videolan.org/AndroidCompile/

Android使用VLC庫開發自己的視頻播放器 ?https://blog.csdn.net/u011365633/article/details/74278063

Mac編譯vlc-android ?https://blog.csdn.net/hwliu51/article/details/77417924

--------------------------------

安裝一些工具軟件

sudo apt-get install automake ant autopoint cmake build-essential libtool \

patch pkg-config protobuf-compiler ragel subversion unzip git \

openjdk-8-jre openjdk-8-jdk flex

或者:

brew install automake ant autopoint cmake build-essential libtool \

patch pkg-config ?ragel subversion unzip \

openjdk-8-jre openjdk-8-jdk flex

brew 全稱Homebrew,安裝

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install git

brew install gettext ? --> ?autopoint

echo 'export PATH="/usr/local/Cellar/gettext/0.19.8.1/bin:$PATH"' >> ~/.bash_profile

退出terminal(終端),重新啟動終端,然后輸入:echo $PATH,按回車執行命令查看當前變量值

brew install unzip

echo 'export PATH="/usr/local/opt/unzip/bin:$PATH"' >> ~/.bash_profile

退出terminal(終端),重新啟動終端,然后輸入:echo $PATH,按回車執行命令查看當前變量值

--------------------------------

一些編譯錯誤處理方法

brew install md5sha1sum

brew install wget

./compile.sh: line 303: ./gradlew: Permission denied 問題:

https://blog.csdn.net/mq2553299/article/details/78754020

chmod +x gradlew

./gradlew

--------------------------------

Android NDK

download the NDK r14b for Linux/Mac.

Android NDK下載(r10d r13b r14b) ?https://blog.csdn.net/momo0853/article/details/73898066

android-ndk-r14b-darwin-x86_64.zip

--------------------------------

使用Git下載VLC-Android代碼,如果未安裝Git,請先執行apt-get install git

git clone https://code.videolan.org/videolan/vlc-android.git

--------------------------------

環境變量設置

export ANDROID_SDK=/Users/andyli/Library/Android/sdk

export ANDROID_NDK=/Users/andyli/mydoc/OpenProject/android-ndk-r14b

export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools

編譯

./compile.sh -a arm64

其中'-a'的可選有arm,arm64,x86,x86_64,mips,mips64,如果缺省參數,則默認為arm

單獨編譯VLC庫

./compile-libvlc.sh -a arm64

--------------------------------

local.properties

sdk.dir=/Users/andyli/Library/Android/sdk

ndk.dir=/Users/andyli/mydoc/OpenProject/android-ndk-r14b

--------------------------------

Android Studio -使用 Gradle打包多版本APK——buildTypes和productFlavors

https://blog.csdn.net/xx326664162/article/details/48467343

Android Studio中的productFlavors指定默認編譯執行的任務

https://blog.csdn.net/fly_yuge/article/details/52229501

--------------------------------

vlc-android/build.gradle

revision() 同步錯誤 Process 'command 'git'' finished with non-zero exit value 128

def revision() {

def code = new ByteArrayOutputStream()

exec {

commandLine 'git', 'rev-parse', '--short', 'HEAD'

standardOutput = code

}

return code.toString()

}

以上出錯是因為沒有git commit。如果不需要git,可以如下處理:

def revision() {

return '3.0.x‘

/*

def code = new ByteArrayOutputStream()

exec {

commandLine 'git', 'rev-parse', '--short', 'HEAD'

standardOutput = code

}

return code.toString()

*/

}

關于git命令“git rev-parse --short HEAD”在android studio中使用與配置的個人探究

https://blog.csdn.net/y97524027/article/details/52690077

Mac環境下使用Android Studio配置GIT

https://blog.csdn.net/a709314090/article/details/52089858

Android Studio取消關聯Git

https://blog.csdn.net/lyj1005353553/article/details/55519487

--------------------------------

android studio打包方式

https://blog.csdn.net/teamomylife/article/details/70224929

動態設置一些額外信息

把當前的編譯時間、編譯的機器、最新的commit版本添加到apk

android {

defaultConfig {

resValue "string", "build_time", buildTime()

resValue "string", "build_host", hostName()

resValue "string", "build_revision", revision()

}

}

def buildTime() {

return new Date().format("yyyy-MM-dd HH:mm:ss")

}

def hostName() {

return System.getProperty("user.name") + "@" + InetAddress.localHost.hostName

}

def revision() {

def code = new ByteArrayOutputStream()

exec {

commandLine 'git', 'rev-parse', '--short', 'HEAD'

standardOutput = code

}

return code.toString()

}

上述代碼實現了動態的添加了3個字符串資源: build_time、build_host、build_revision, 然后在其他地方可像如引用字符串一樣使用如下:

// 在Activity里調用

getString(R.string.build_time) // 輸出編譯時間,如:2016-09-07 17:01

getString(R.string.build_host) // 輸出電腦的用戶名和PC

getString(R.string.build_revision) // 輸出3dd5823, 這是最后一次commit的sha值

--------------------------------

Mac find 命令 ?https://blog.csdn.net/sulinux/article/details/51916338

mac中通過find查找apk:

vlc-android-master-3.x andyli$ find ./ -name "*.apk"

.//vlc-android/build/outputs/apk/vanillaARMv8/debug/VLC-Android-3.0.5-ARMv8.apk

在Mac中編譯vlc-android小結相關教程

總結

以上是生活随笔為你收集整理的vlc android 编译 mac,在Mac中编译vlc-android小结的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。