错误日志:

E: Thread[Thread-28 (Spawn-1),5]: java.lang.UnsupportedOperationException

代码原文:

const thread_1 = threads.start(function(){ 
    for (let i = 10; i; i--){ 
          toast(i); 
          sleep(2 * 1000); 
    }
 }); 
threads.start(function(){ 
    events.observeKey(); 
    events.onceKeyDown("volume_down", function(){ 
        if (thread_1.isAlive()){ 
            thread_1.interrupt(); 
        } 
    }); 
    events.onceKeyDown("volume_up" , function(){ 
        exit(); 
    }); 
});
thread_1.join();
最后由 Zhan 0 编辑