- 博客(658)
- 资源 (1)
- 收藏
- 关注
翻译 视图绑定View binding
如果为某个模块启用了视图绑定,系统会为该模块包含的每个 XML 布局文件生成一个绑定类。在模块中启用视图绑定后,它会为该模块中显示的每个 XML 布局文件生成一个绑定类。绑定类的实例包含对在相应布局中具有 ID 的所有视图的直接引用。考虑到这些因素,在某些情况下,最好在项目中同时使用视图绑定和数据绑定。您可以在需要高级功能的布局中使用数据绑定,在不需要高级功能的布局中使用视图绑定。视图绑定在生成代码时无法验证此属性的值。如需设置绑定类的实例,以便与 fragment 配合使用,请在 fragment 的。
2024-01-18 07:02:59 51
原创 Keil 退出debug时提示:“ Encountered an improper argument”
遇到了 Keil STM32 退出debug时提示:“Encountered an improper argument”,上网搜了一下,铺天盖地的答案,统一是不能有中文路径和中文文件名。退出debug前kill所有断点,要kill不是disable,我验证了这不能解决我的的问题。
2023-05-26 16:21:22 391
原创 android studio 改变avd虚拟机路径
android studio avd默认路径是C盘,一个虚拟机文件10G左右,很占用C盘空间。但可以修改配置文件改变avd虚拟机的保存路径。C:\Users\micro\.android\avd\Pixel_4_API_28.ini的内容改为如下:avd.ini.encoding=UTF-8path=D:\AndroidIDEA\.android\avd\Pixel_4_API_28.avdpath.rel=avd\Pixel_4_API_28.avdtarget=android-28
2022-02-13 22:49:20 2534
原创 android studio 改变.gradle默认目录
android studio 的默认目录是c盘,占用C盘空间。按照下面方式将.gradle默认目录改在D盘下。修改的文件是D:\Program Files\Android\Android Studio\bin\idea.properties然后重启android studio 生效。修改后的完整idea.properties文件如下:# Use ${idea.home.path} macro to specify location relative to IDE install..
2022-02-13 22:30:18 5614
原创 android mma
android mm编译报错:ninja: error: 'out/host/linux-x86/framework/host-libprotobuf-java-full.jar', needed by 'out/host/common/obj/JAVA_LIBRARIES/platformprotos_intermediates/classes-full-debug.jar'用mma即可...
2020-05-07 19:59:02 559
原创 repo Manifest Format
repo Manifest FormatA repo manifest describes the structure of a repo client; that isthe directories that are visible and where they should be obtainedfrom with git.The basic structure of a manife...
2020-01-29 20:17:59 367
原创 android 堆栈调试方法
// Throws AssertionError if the input is false.public static void assertTrue(boolean cond) { getCaller(); Log.w(TAG, "assertTrue cond: "+cond); if (!cond) { throw new AssertionEr...
2019-10-30 19:48:24 260
原创 init.rc service 无法启动
# start preinstall init: Could not ctl.start for service preinstall: File /vendor/bin/preinstall.sh(labeled "u:object_r:vendor_file:s0") has incorrect label or no ...
2019-07-24 16:29:15 9101 3
原创 git cherry-pick 多个commit
$ git cherry-pick b794641007e9a80f8f1e0704f89e614e95751609^..da6d0352518ddf1eb917fc614428f6deb5e4eee7前面的commit时间早于后面的commit时间前面的commit和后面的commit都会移过来,都是包含关系。...
2019-06-27 11:14:34 2563
原创 去掉Android is starting...
frameworks\base\core\res\res\values\strings.xml<!-- [CHAR LIMIT=40] Title of dialog that is shown when system is starting. --> <string name="android_start_title">Android is starting...
2019-06-14 16:28:01 3806 10
原创 error: expected reference but got (raw string)
环境:Android Studio 3.2.1Build #AI-181.5540.7.32.5056338, built on October 9, 2018JRE: 1.8.0_152-release-1136-b06 amd64JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.oWindows 7 6.1错误:app\buil...
2019-03-14 14:44:13 4519
原创 java sleep 暂停当前执行的线程
示例代码1:public class mySleep { public static void main(String[] args) { MyThread t1 = new MyThread("tSleep123"); t1.start(); try { Thread.sleep(100); //调用静态...
2019-01-05 22:54:31 550
原创 git log和tag一起显示
git log和tag一起显示--no-decorate, --decorate[=short|full|no] Print out the ref names of any commits that are shown. If short is specified, the ref name prefixes refs/heads/, refs/tags/ and re...
2019-01-04 18:19:12 6265
原创 adb push apk
adb shell suchmod 777 /dataexitexitadb push Y:\AA\my.apk /datacp /data/my.apk /system/app/my.apkchmod 644 /system/app/my.apk
2019-01-03 15:48:06 717
原创 git stash
git stash show stash@{0} 查看stash中修改了哪几个文件git show stash@{0} 查看stash中的具体修改内容如果要从多个文件中仅stash某一个文件,按如下操作:1. 不需要stash的文件用 git add 2. 剩下需要stash的文件 git stash --keep-index3. 恢复第一步add的文件 git reset...
2019-01-02 11:28:08 137
原创 android studio lint检查
android studio 3.2.1android:debuggable="true" 即编译生成debug版时,不会lint检查。编译生成release版时才会lint检查,一般提示如下:Lint found fatal errors while assembling a release target.To proceed, either fix the issues ide...
2018-12-27 12:02:16 1032
原创 android studio 编译后 app-debug.apk 和 app-release.apk 的区别
AS版本:Android studio 3.2.1app-debug.apk 和 app-release.apk 的核心区别在AndroidManifest.xml 。生成app-debug.apk时,编译器会自动在该apk的AndroidManifest.xml中添加 android:debuggable="true"生成app-release.apk时,编译器会自动在该apk的And...
2018-12-26 12:16:13 13640 4
原创 Android Studio 加载第三方jar包并提高framework.jar包优先级
android studio 版本 3.2.1framework源码编译出来的jar路径如下:out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes.jardroidlogic源码编译(vendor/amlogic/frameworks/core/java)出来的jar路径:out/target/comm...
2018-12-26 12:12:04 1351 2
原创 windows软链接mklink
mklink创建符号链接。MKLINK [[/D] | [/H] | [/J]] Link Target /D 创建目录符号链接。默认为文件 符号链接。 /H 创建硬链接,而不是符号链接。 /J 创建目录联接。 Link 指定新的符号链接名称。 ...
2018-11-12 16:53:18 1579
原创 linux 服务器增加用户和samba
adduser userxxxpasswd userxxx samba:/etc/samba/smb.conf smbpasswd -a userxxx
2018-11-06 17:32:10 936
原创 android 4.4 编译需要make 3.81 , android 6.0和7.1编译需要make 4.1
android 4.4 编译需要make 3.81 , android 6.0和7.1编译需要make 4.1从http://ftp.gnu.org/gnu/make/ 这里,分别下载make-3.81.tar.gz 和make-4.1.tar.gz分别进入目录:./configuremakesudo make installsudo rm /usr/bin/make...
2018-11-06 17:26:02 466
原创 linux 设置cpufreq
performance方法:在sys/devices/system/cpu/cpu0/cpufreq目录下:echo performance > scaling_governor ------------------------------Governor Description performance Run the CPU at the max...
2018-08-31 17:02:54 451
原创 ubuntu 安装samba
apt install samba samba-commonvim /etc/samba/smb.conf 修改如下:[homes] comment = Home Directories browseable = yes read only = no path = /root valid users = root 添加samba客户端用...
2018-08-27 13:52:39 3172
原创 jack server无法启动
启动失败,log如下$ jack-admin start-serverLaunching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4g -cp /home/libz/.jack-server/laun...
2018-08-22 18:40:39 6268
原创 ubuntu 开机自动挂载硬盘
sudo vim /etc/fstab在文件末尾增加/dev/sda1 /mnt/compile ext4 defaults 0 0/dev/sda2 /mnt/repo ext4 defaults 0 0 重新启动生效
2018-08-19 13:08:20 703
原创 SecureCRT ssh heartbeat
Anti-idle groupThis group contain controls designed to prevent your connection from being closed due to a lack of network traffic between SecureCRT and the remote machine.Send string n every n sec...
2018-08-15 10:46:39 363
原创 ubuntu 18.04编译android 7.1.2
error:flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed. Aborted (core dumped) 解决方法 : 在编译脚本中...
2018-08-11 21:33:53 2301
原创 ubuntu 16.04 server 设置固定IP
打开 /etc/network/interfaces后将原有的下面内容# The primary network interfaceauto ens33iface ens33 inet dhcp 改为如下内容:# The primary network interfaceauto ens33#iface ens33 inet dhcpiface ens33 inet st...
2018-08-01 21:23:04 1587
原创 git log --stat
git log --stat显示每个log的commit 标题,并且显示哪几个文件被修改了,各个文件增加和删除了多少行。
2018-07-18 19:01:46 1136
原创 perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
$ git push --mirror [email protected]:xxx.git perl: warning: Setting locale failed.perl: warning: Please check that your locale settings: LANGUAGE = "en_US:", LC_ALL = (unset), ...
2018-07-16 17:35:03 2837 1
原创 gitolite修复authorized_keys丢失以及仓库损坏
gitolite 修复$ gitolite setup -pk git.pub Initialized empty Git repository in /home/git/repositories/xxx.git/WARNING: /home/git/.ssh/authorized_keys missing; creating a new one (this is normal o...
2018-07-14 12:51:03 845
原创 HID增加按键
common/drivers/hid/hid-input.cstatic const unsigned char hid_keyboard[256] = { 0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 2...
2018-07-10 10:02:52 1058
原创 git status -uno 不显示未跟踪文件
git status -uno 不显示未跟踪文件-u[<mode>], --untracked-files[=<mode>] Show untracked files. The mode parameter is used to specify the handling of untracked files. It is opti...
2018-07-08 17:47:11 4169
原创 git config
git config --global core.whitespace cr-at-eol cr-at-eol treats a carriage-return at the end of line as part of the line terminator, i.e. with it, trailing-space does not ...
2018-07-07 16:13:27 522
原创 git clone 报错 warning: Clone succeeded, but checkout failed.
git clone时报错: 10:23:54 remote: Counting objects: 512376, done. 10:23:58 remote: Compressing objects: 100% (357372/357372), done. 11:36:04 remote: Total 512376 (delta 119614), reused 512376 (...
2018-06-01 09:39:17 22053
原创 clang编译器问题
clang: error: linker command failed with exit code 1 (use -v to see invocation)build/core/host_shared_library_internal.mk:51: recipe for target 'out/host/linux-x86/obj/lib/libart.so' failedmake: *** [...
2018-03-27 14:25:21 646
原创 ubuntu 16.04虚拟机 安装 openjdk 1.7
sudo add-apt-repository ppa:openjdk-r/ppa sudo apt-get update 发现更新失败,是因为ubuntu部分源在大陆无法访问。编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份):deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restri...
2018-03-27 12:00:24 740
原创 android 编译环境修复
sudo apt install lib32z1sudo apt install bc sudo apt install curlsudo apt install python-pipsudo apt install libswitch-perl$ java -versionopenjdk version "1.8.0_151"OpenJDK Runtime Environment (build ...
2018-03-25 18:00:12 202
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人