环境

鉴于我有:

  • Kotlin 0.12.213
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.google.android.gms:play-services:7.5.0'
        compile 'com.android.support:appcompat-v7:22.2.0'
        compile 'com.android.support:support-v4:22.2.0'
        compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    }
    
    buildscript {
        ext.kotlin_version = '0.12.213'
        repositories {
            mavenCentral()
        }
        dependencies {
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
            classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
        }
    }
    
  • Gradle插件1.2.3
    classpath 'com.android.tools.build:gradle:1.2.3'
    
  • Android Studio AI-141.1972460

  • 问题

    当我运行我的android应用程序时,我得到:
    com.android.ide.common.blame.output.GradleMessage$Kind PluginClassLoader[org.jetbrains.kotlin, 0.12.200.Idea141.8]
    com.intellij.openapi.externalSystem.model.ExternalSystemException: com.android.ide.common.blame.output.GradleMessage$Kind PluginClassLoader[org.jetbrains.kotlin, 0.12.200.Idea141.8]
        at org.jetbrains.plugins.gradle.service.project.GradleExecutionHelper.execute(GradleExecutionHelper.java:223)
        at com.android.tools.idea.gradle.invoker.GradleTasksExecutor.invokeGradleTasks(GradleTasksExecutor.java:400)
        at com.android.tools.idea.gradle.invoker.GradleTasksExecutor.run(GradleTasksExecutor.java:221)
        at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
        at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
        at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:400)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
        at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
    

    解决方法
  • 现在,在AndroidStudio 1.3 Preview上运行我的应用程序的唯一方法是关闭AndroidStudio,并在每次我想运行该应用程序时再次将其打开。否则,后续运行将引发以上异常。
    使cahcnes无效/重新启动,未能解决问题。
  • 只需使用AndroidStudio 1.2.1.1,因为该问题不存在。
  • 最佳答案

    这在Kotlin 0.12.356中已修复。您可能会在相应的问题KT-7862中看到讨论。

    09-10 06:28