带有 kotlin 0.12.213 的 AndroidStudio ExternalSystemException
AndroidStudio ExternalSystemException with kotlin 0.12.213
环境
鉴于我有:
科特林 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.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.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl.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.run(PooledThreadExecutor.java:56)
解决方法
现在 运行 我在 AndroidStudio 1.3 预览版上的应用程序的唯一方法是关闭 AndroidStudio,然后每次我想重新打开它运行 应用程序。否则,后续的 运行 将抛出上述异常。
使cahcnes/restart失效,没有解决问题。
只需使用AndroidStudio 1.2.1.1,因为那里不存在该问题。
这已在 Kotlin 0.12.356 中修复。可以看到对应issue的讨论:KT-7862.
环境
鉴于我有:
科特林 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.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.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl.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.run(PooledThreadExecutor.java:56)
解决方法
现在 运行 我在 AndroidStudio 1.3 预览版上的应用程序的唯一方法是关闭 AndroidStudio,然后每次我想重新打开它运行 应用程序。否则,后续的 运行 将抛出上述异常。 使cahcnes/restart失效,没有解决问题。
只需使用AndroidStudio 1.2.1.1,因为那里不存在该问题。
这已在 Kotlin 0.12.356 中修复。可以看到对应issue的讨论:KT-7862.