Build shadowsocksr-android with sbt
Posted skdev
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Build shadowsocksr-android with sbt相关的知识,希望对你有一定的参考价值。
1 install jdk8
sudo apt-get install openjdk-8-jdk
2 install sbt
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add
sudo apt-get update
sudo apt-get install sbt
after installing successfully,remove scala source from apt source
sudo rm /etc/apt/sources.list.d/sbt.list
sudo rm /etc/apt/sources.list.d/sbt_old.list
sudo apt-get update
vi ~/.sbt/repositories
[repositories]
local
huaweicloud-maven: https://repo.huaweicloud.com/repository/maven/
maven-central: https://repol.maven.org/maven2/
sbt-plugin-repo: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
3 get source
链接:https://pan.baidu.com/s/1JIPLBTGSXJqFqcy2oj0Wkg 提取码:ny06
tar -xvf shadowsocksr-android-3.5.4.tar
4 export path
export ANDROID_HOME=/path/shadowsocksr-android-3.5.4/android-sdk-linux
export ANDROID_NDK_HOME=/path/shadowsocksr-android-3.5.4/android-ndk-r13b
5 edit keystore
cd shadowsocksr-android
vi local.properties
key.alias: alias_name
key.store: /path/shadowsocksr-android-3.5.4/my-release-key.keystore
key.store.password: 123456
6 buid source
./build.sh
7 generate apk
sbt clean android:package-release
apk will be generated in target/android/output/
以上是关于Build shadowsocksr-android with sbt的主要内容,如果未能解决你的问题,请参考以下文章
项目中的 build.gradle 与应用程序中的 build.gradle
build.gradle(项目)和 build.gradle(模块)之间的区别
如何修复 Flutter build_runner 错误:无法预编译 build_runner:build_runner: