Comments (7)
更新最新版 然后运行 config.js
进入第二项 进阶配置
开启 基于图像分析
from ant-forest.
10:54:04.752/E: Function importClass must be called with a class; had "[JavaPackage com.tony.BitCheck]" instead. (#14)
Function importClass must be called with a class; had "[JavaPackage com.tony.BitCheck]" instead.
at :14:0
at file:/storage/emulated/0/脚本/蚂蚁森林-Tony/core/ImgBasedFriendListScanner.js:8:0
at file:/storage/emulated/0/脚本/蚂蚁森林-Tony/core/Ant_forest.js:15:0
at _load (file:///android_asset/modules/jvm-npm.js:60:0)
at /storage/emulated/0/脚本/蚂蚁森林-Tony/main.js:19:0
main运行报错,请问大神如何解决
from ant-forest.
更新最新版1.2.0.2
然后强制结束AutoJS,这个是免费版AutoJS的bug
操作完再运行main.js
如果还有问题尝试 运行config.js
进入 进阶配置
中勾选 基于图像分析
from ant-forest.
10:59:05.325/E: 获取截图失败多次[3], 可能已经没有了截图权限,重新执行脚本
前期执行正常,进入好友列表下拉一次之后,log记录截图失败。重新执行脚本,到此一直重复。
from ant-forest.
已按步骤操作,好友列表下拉两次之后,还是获取截图失败,同样出现上述问题。
from ant-forest.
- 尝试将
lib/CommonFunction.js line:67-95
修改如下
/**
* 校验截图权限,权限失效则重新启动,不释放任务
* @param {boolean} releaseLock 是否在失败后释放任务队列
* @param {number} errorLimit 失败尝试次数
*/
this.checkCaptureScreenPermission = function (releaseLock, errorLimit) {
// 失败重试次数 默认值改为5
errorLimit = errorLimit || 5
// 获取截图 用于判断是否可收取
let screen = null
let errorCount = 0
do {
this.waitFor(function () {
screen = captureScreen()
}, 1000) // 延迟时间改为1000毫秒,如果依旧失败改成更大
if (!screen) {
_logUtils.debugInfo('获取截图失败 再试一次 count:' + (++errorCount))
}
} while (!screen && errorCount < errorLimit)
if (!screen) {
_logUtils.errorInfo(['获取截图失败多次[{}], 可能已经没有了截图权限,重新执行脚本', errorCount], true)
this.setUpAutoStart(0.02)
if (releaseLock) {
_runningQueueDispatcher.removeRunningTask(true)
} else {
this.setSpring
}
exit()
}
return screen
}
from ant-forest.
- 依旧不行的话你直接改成这样好了, 这个方法本身是为了防止没有了截图权限之后,一直阻塞等待截图返回。一般是因为其他脚本运行并请求了截图权限之后导致当前脚本权限丢失。
this.checkCaptureScreenPermission = function (releaseLock, errorLimit) {
return captureScreen()
}
from ant-forest.
Related Issues (20)
- 提示 自己识别逛一逛按钮失败,请主动配置区域或者图片信息,请教怎么处理 HOT 3
- 开机自启动方案 HOT 2
- 希望循环和永不停止功能不互斥 HOT 2
- 大佬有意向修改autoX.js v6系列吗? HOT 2
- 华为mate30pro每天自动解锁收集能量会自动打开手电筒,怎么回事 HOT 2
- 一加手机待机一晚上后获取键盘控件失败 HOT 1
- Android13 支持吗? HOT 1
- 能否提供一个安卓5(32位)可以用的autojs modify或困鱼? HOT 1
- 神奇海洋点击垃圾无反应 HOT 9
- 华为p50 pro手机在鸿蒙3.0系统下无法有效解锁 HOT 1
- 使用GitHub Actions刷步数
- 求更新网商银行----绿色经营 HOT 3
- 三星s20升级安装安卓13后自动解锁失败 HOT 1
- 请问是把图案解锁的方式移除了么? HOT 5
- 无法收取能量球,提示找到能量球[] HOT 2
- 定时功能失效 HOT 1
- 查找浇水按钮的问题 HOT 1
- 执行完小号能量雨后,点击首页开始,还是会执行小号能量雨 HOT 1
- 希望增加一个小号收能量再逛一逛的脚本,谢谢! HOT 1
- 解锁不起作用,除info.log HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ant-forest.