日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發(fā)布時(shí)間:2025/4/5 编程问答 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vlc android 编译 mac,在Mac中编译vlc-android小结 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

在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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。