加速的android App构建
减少moudle的使用,这样可以减少构建其他项目时间
减少lint检查项
1 | lintOptions { |
增加内存,开启预编译类库
1 | dexOptions { |
1 | lintOptions { |
1 | dexOptions { |
npm install -g @ionic/cli
npm uninstall -g ionic
ionic start projectName <mode>tabs
ionic serve
ionic capacitor add android
ionic cordova prepare android
ionic cordova run android -l
修改 projectName\platforms\android\cordova\lib\builders\ProjectBuilder.js中的gradle版本
1 | Default method desugaring of `com.hj.pos.android.base.BaseAdapter` failed because its super class `androidx.recyclerview.widget.RecyclerView$Adapter` is missing |
无法找到RecyclerView,但是它确实存在,改用引入项目,依赖就好了,具体原因待查
1 | adb shell settings put global policy_control immersive.status=* |
1 | adb shell settings put global policy_control immersive.navigation=* |
1 | adb shell settings put global policy_control immersive.full=* |
1 | adb shell settings put global policy_control null* |
adb shell am
1 | //使用Action方式打开系统设置-输入法设置 |
1 | //使用ComponentName 方式启动一个Service |
1 | adb shell am force-stop com.some.package |
1 | adb shell am kill com.some.package |
1 | adb shell am kill-all |
1 | //恢复出厂设置的方法,会清除内存所有内容(慎重测试!!!!) |
1 | adb shell am instrument -w com.android.phone.tests/com.android.phone.runners.FunctionalTestRunner |
1 | adb shell am profile start 17495 /mnt/sdcard/profile.txt |
1 | adb shell am profile stop 17495 |
1 | adb shell am dumpheap -n 17495 /mnt/sdcard/dumpheap.txt |
1 | adb shell am set-debug-app -w com.some.package |
1 | adb shell am clear-debug-app |
1 | adb shell am monitor |
1 | adb shell am screen-compat on com.some.package |
1 | adb shell am display-size 1280x800 |
1 | adb shell am display-density 480 |
1 | adb shell am to-uri -a android.settings.INPUT_METHOD_SETTINGS |
1 | adb shell am to-intent-uri -a android.settings.INPUT_METHOD_SETTINGS |
1 | -a <ACTION> |
1 | 2019-04-14 17:51:14.506 10189-10189/com.ss.android.ex.parent D/GGK: no WonderfulVideo |
这个删除操作是在Android源码的 /system/core/logd/LogBufferElement.cpp 文件中实现的,类似的还有一个 expire x lines 日志
root权限下可用
1 | setprop ro.logd.filter disable |