2

系统/api配置

Android studio version : 2.2.3
Gradle version : 2.2.1
Java version : 1.8
classpath 'com.android.tools.build:gradle:1.3.1'

例外

18:26:43 NoReadAccessException
         Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
         Details: Current thread: Thread[ApplicationImpl pooled thread 20,4,main] 700161407
         ; dispatch thread: false; isDispatchThread(): false
         SystemEventQueueThread: Thread[AWT-EventQueue-0 2.2#AI-145.3537739 Studio, eap:false, os:Windows 10 10.0, java-version:JetBrains s.r.o 1.8.0_76-release-b03,6,main] 1350276257

当我尝试运行应用程序时,我遇到了这个问题,谁能知道我要如何解决这个问题。

4

1 回答 1

0

您可以使用:

 SwingUtilities.invokeLater(() -> {
      // your code here
 });
于 2019-11-05T07:52:29.507 回答