NotePublic/Software/Development/Environment/Android_开发环境搭建-基于_Fedora28.md

1.1 KiB

Android 开发环境搭建-基于 Fedora28

REPO

通过国内镜像下载和安装 Repo

mkdir ~/bin/
cd ~/bin
git clone http://mirrors.ustc.edu.cn/aosp/git-repo.git

将 Repo 加入环境变量中

gedit ~/bashrc

最文件后面新曾:

export PATH=~/bin/git-repo:$PATH

保存退出。

JAVA

sudo dnf install java-1.8.0-openjdk java-1.8.0-openjdk-devel

GCC

sudo dnf install autoconf make gcc gcc-c++ glibc.i686 glibc-devel.i686 glibc-static libstdc++.i686 libstdc++-devel.i686

DEV

sudo dnf install zlib-devel.i686 openssl-devel expat-devel gettext-devel libX11-devel.i686 ncurses-devel.i686

TOOLS

sudo dnf install m4 perl cpio ncurses-libs.i686 gperf flex bison patch byacc
sudo dnf install android-tools

LIBNCURESS 和 LIBTINFO

sudo ln -s libncurses.so.6.1 /usr/lib64/libncurses.so.5

否则找不到 libncurses.so.5

sudo ln -s libtinfo.so.6.1 /usr/lib64/libncurses.so.5

否则找不到 libtinfo.so.5

EXPORT

编译前先去除所有本地化的设置,让命令能正确执行。在编译脚本中(或直接在编译终端中)增加:

export LC_ALL=C