总结一下之前遇到的Android app的开发的小问题

来源:互联网 发布:一直播怎么开通知提醒 编辑:程序博客网 时间:2024/05/18 03:44

1.android error : unbound prefixy 

  (1)有可能是没导入lib工程里的相关文件。 xmlns:tv=http://schemas.android.com/apk/res-auto

  (2)XML布局文件中的标签前缀存在拼写错误。

  (3)XML布局文件的根节点缺少 xmlns:android="http://schemas.android.com/apk/res/android"


2.adb的一些涉及到盒子截图以及录制的命令写法:

(1)adb shell system/bin/screencap -p /sdcard/screenshot.png 截图保存在android 设备的sdcard目录。
(2)adb pull /sdcard/screenshot.png d:\\xx.png 将截图挪到电脑
(3)录制命令:adb shell screenrecord  --time-limit 10 /sdcard/demo.mp4

3.数据库操作以及各种耗时操作不要写在UI线程里面。

4.URL中如果有空格的话,要用%20来进行编码转义处理。

5.Entropic EN7588平台shell下开启adb的方法 system/bin/ ./start adbd

6.打印某个tag的log,logcat -s "TAG"

7.如果Android工程里面有SystemProperties.set(“persist.sys.tag”“value”)的代码,可以在shell下用getprop persist.sys.tag 打印出这个值。

8.a

db shell am force-stop + 包名 即可停止运行某应用


如有更新,以后会继续添加到这里,做个记录。



原创粉丝点击