android中gradle编译error

  1. The binary version of its metadata is 1.7.1, expected version is 1.5.1
    原因:依赖中某些库使用 kotlin 1.7.1 编译,而工程指定为 1.5.1
    解决方式 1:
    升级 gradle 版本,或 kotlin 版本

方式 2:
降低库的版本,如:

1
2
3
4
5
6
7
subprojects { project ->
println "project name:" + project.name
configurations.all {
resolutionStrategy {
force "androidx.activity:activity:$androidx_activity_version"
}
}

npm拉取github仓库失败,解决方法

git clone git://github.com/lajos/iFrameExtractor.git

错误信息:

1
2
3
bower error status code of git: 128
fatal: unable to connect to github.com:
github.com[0: 你的 IP]: errno=Operation timed out

原因:
需要用 https 才能读到数据
解决方法:输入命令
git config --global url."https://".insteadOf git://

guacamole-common-js库编译

gulp 编译脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var insert = require('gulp-insert');

gulp.task('default', function() {
return gulp.src('guacamole-common-js/src/main/webapp/modules/*.js')
.pipe(concat('guacamole-common.js'))
.pipe(insert.append('module.exports = Guacamole;'))
.pipe(gulp.dest('dist'))
.pipe(uglify())
.pipe(rename('guacamole-common.min.js'))
.pipe(gulp.dest('dist'));
});

adb用法

启动 App

adb shell monkey -p com.android.settings -c android.intent.category.LAUNCHER 1

列出 app

adb shell pm list packages

发送广播

adb root
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED

android集成X5浏览器

参考博文

https://blog.csdn.net/qq_34205629/article/details/122375262

下载内核

android studio 打开 X5Demo(官方 demo),

  1. 点击”TBS 调试“
  2. 点击”安装线上内核“
  3. 控制台查看日志输入:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"BUGLY" : 0,
"DOWNLOADMAXFLOW" : 300,
"DOWNLOADURL" : "https://tbstx.imtt.qq.com/others/release/x5/tbs_core_046317_20221125231059_nolog_fs_obfs_arm64-v8a_release.tbs",
"DOWNLOAD_FAILED_MAX_RETRYTIMES" : 10,
"DOWNLOAD_MIN_FREE_SPACE" : 0,
"DOWNLOAD_SINGLE_TIMEOUT" : 1200000,
"DOWNLOAD_SUCCESS_MAX_RETRYTIMES" : 3,
"MSG" : "success, dcl:103846,url:102237",
"PKGMD5" : "0b8d4f9faecea88015064b34092ffd82",
"RESETDECOUPLECORE" : 0,
"RESETTODECOUPLECORE" : 0,
"RESETTOKEN" : 1,
"RESETX5" : 0,
"RESPONSECODE" : 1,
"RET" : 0,
"TBSAPKFILESIZE" : 52874442,
"TBSAPKSERVERVERSION" : 46317,
"TEMPLATESWITCH" : 0,
"UPLOADLOG" : 0,
"USEBACKUPVER" : 0,
"USEVIDEO" : 1,
"USEX5" : 1,
"USE_SECURITY" : 0
}