AutoJs版本:4.04Alpha6
手机:小米4,root,安卓6.0

更新之后出现这个bug,经查找发现是find()函数有问题。改成findOne()就可以了,但是我需要用find。
在米6,android8上没有这个bug。

var a = textContains("***").find();
toastLog(a);
16:02:03.024/E: 
java.lang.NoClassDefFoundError: java.util.function.Predicate
	at libcore.reflect.InternalNames.getClass(InternalNames.java:55)
	at java.lang.Class.getDexCacheType(Class.java:476)
	at java.lang.reflect.AbstractMethod.getParameterTypes(AbstractMethod.java:166)
	at java.lang.reflect.Method.getParameterTypes(Method.java:170)
	at org.mozilla.javascript.JavaMembers$MethodSignature.<init>(JavaMembers.java:390)
	at org.mozilla.javascript.JavaMembers.discoverAccessibleMethods(JavaMembers.java:348)
	at org.mozilla.javascript.JavaMembers.discoverAccessibleMethods(JavaMembers.java:302)
	at org.mozilla.javascript.JavaMembers.reflect(JavaMembers.java:419)
	at org.mozilla.javascript.JavaMembers.<init>(JavaMembers.java:43)
	at org.mozilla.javascript.JavaMembers.lookupClass(JavaMembers.java:807)
	at org.mozilla.javascript.NativeJavaObject.initMembers(NativeJavaObject.java:54)
	at org.mozilla.javascript.NativeJavaObject.<init>(NativeJavaObject.java:44)
	at org.mozilla.javascript.NativeJavaObject.<init>(NativeJavaObject.java:34)
	at org.mozilla.javascript.WrapFactory.wrapAsJavaObject(WrapFactory.java:115)
	at com.stardust.autojs.engine.RhinoJavaScriptEngine$WrapFactory.wrapAsJavaObject(RhinoJavaScriptEngine.java:192)
	at org.mozilla.javascript.WrapFactory.wrap(WrapFactory.java:72)
	at com.stardust.autojs.engine.RhinoJavaScriptEngine$WrapFactory.wrap(RhinoJavaScriptEngine.java:181)
	at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:131)
	at org.mozilla.javascript.VMBridge_custom$InterfaceAdapterWrapper.invokeImpl(VMBridge_custom.java:146)
	at org.mozilla.javascript.VMBridge_custom$InterfaceAdapterWrapper.lambda$invoke$0$VMBridge_custom$InterfaceAdapterWrapper(VMBridge_custom.java:129)
	at org.mozilla.javascript.VMBridge_custom$InterfaceAdapterWrapper$$Lambda$0.run(Unknown Source)
	at org.mozilla.javascript.VMBridge_custom$InterfaceAdapterWrapper.call(VMBridge_custom.java:138)
	at org.mozilla.javascript.VMBridge_custom$InterfaceAdapterWrapper.invoke(VMBridge_custom.java:130)
	at org.mozilla.javascript.VMBridge_custom.lambda$newInterfaceProxy$0$VMBridge_custom(VMBridge_custom.java:63)
	at org.mozilla.javascript.VMBridge_custom$$Lambda$0.invoke(Unknown Source)
	at java.lang.reflect.Proxy.invoke(Proxy.java:393)
	at $Proxy8.asArray(Unknown Source)
	at com.stardust.autojs.runtime.ScriptBridges.asArray(ScriptBridges.java:53)
	at com.stardust.autojs.engine.RhinoJavaScriptEngine$WrapFactory.wrap(RhinoJavaScriptEngine.java:179)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:236)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:399)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3452)
	at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
	at org.mozilla.javascript.Context.evaluateReader(Context.java:1275)
	at com.stardust.autojs.engine.RhinoJavaScriptEngine.doExecution(RhinoJavaScriptEngine.java:75)
	at com.stardust.autojs.engine.JavaScriptEngine.execute(JavaScriptEngine.java:22)
	at com.stardust.autojs.engine.LoopBasedJavaScriptEngine.access$001(LoopBasedJavaScriptEngine.java:19)
	at com.stardust.autojs.engine.LoopBasedJavaScriptEngine.lambda$execute$0$LoopBasedJavaScriptEngine(LoopBasedJavaScriptEngine.java:44)
	at com.stardust.autojs.engine.LoopBasedJavaScriptEngine$$Lambda$0.run(Unknown Source)
	at android.os.Handler.handleCallback(Handler.java:742)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:157)
	at com.stardust.autojs.engine.LoopBasedJavaScriptEngine.execute(LoopBasedJavaScriptEngine.java:61)
	at com.stardust.autojs.engine.LoopBasedJavaScriptEngine.execute(LoopBasedJavaScriptEngine.java:36)
	at com.stardust.autojs.execution.LoopedBasedJa
最后由 basking 编辑
  • 2
    帖子
  • 1095
    浏览

与 Auto.js 的连接断开,我们正在尝试重连,请耐心等待