vlc android 编译 mac,在Mac中编译vlc-android小结
在Mac中編譯vlc-android小結(jié)
在Mac中編譯vlc-android小結(jié)
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庫開發(fā)自己的視頻播放器 ?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,按回車執(zhí)行命令查看當(dāng)前變量值
brew install unzip
echo 'export PATH="/usr/local/opt/unzip/bin:$PATH"' >> ~/.bash_profile
退出terminal(終端),重新啟動終端,然后輸入:echo $PATH,按回車執(zhí)行命令查看當(dāng)前變量值
--------------------------------
一些編譯錯(cuò)誤處理方法
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,請先執(zhí)行apt-get install git
git clone https://code.videolan.org/videolan/vlc-android.git
--------------------------------
環(huán)境變量設(shè)置
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,如果缺省參數(shù),則默認(rèn)為arm
單獨(dú)編譯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指定默認(rèn)編譯執(zhí)行的任務(wù)
https://blog.csdn.net/fly_yuge/article/details/52229501
--------------------------------
vlc-android/build.gradle
revision() 同步錯(cuò)誤 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()
}
以上出錯(cuò)是因?yàn)闆]有g(shù)it commit。如果不需要git,可以如下處理:
def revision() {
return '3.0.x‘
/*
def code = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = code
}
return code.toString()
*/
}
關(guān)于git命令“git rev-parse --short HEAD”在android studio中使用與配置的個(gè)人探究
https://blog.csdn.net/y97524027/article/details/52690077
Mac環(huán)境下使用Android Studio配置GIT
https://blog.csdn.net/a709314090/article/details/52089858
Android Studio取消關(guān)聯(lián)Git
https://blog.csdn.net/lyj1005353553/article/details/55519487
--------------------------------
android studio打包方式
https://blog.csdn.net/teamomylife/article/details/70224929
動態(tài)設(shè)置一些額外信息
把當(dāng)前的編譯時(shí)間、編譯的機(jī)器、最新的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()
}
上述代碼實(shí)現(xiàn)了動態(tài)的添加了3個(gè)字符串資源: build_time、build_host、build_revision, 然后在其他地方可像如引用字符串一樣使用如下:
// 在Activity里調(diào)用
getString(R.string.build_time) // 輸出編譯時(shí)間,如: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小結(jié)相關(guān)教程
總結(jié)
以上是生活随笔為你收集整理的vlc android 编译 mac,在Mac中编译vlc-android小结的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android 取消按钮禁止,andro
- 下一篇: 高考志愿规划师 十万买个建议真的值吗