将 Kotlin 集成到一个使用 multidex 的大型项目中。
因此,当我尝试构建时,出现此错误:
:incrementalDesygnerDebugJavaCompilationSafeguard UP-TO-DATE
:compileDesygnerDebugKotlin
WARN: Failed to initialize native filesystem for Windows
java.lang.RuntimeException: Could not find installation home path. Please make sure bin/idea.properties is present in the installation directory.
路径似乎配置正确,idea.properties
文件似乎在那里:C:\Program Files\Android\Android Studio\bin\idea.properties
建筑物需要几分钟才能停止,所以我从 Windows 上的任务管理器手动停止它。
当我重试时 - 构建成功!
但是当我更改一行并重建它时,它再次显示相同的错误。
有时我也会得到这个:
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: PermGen space
尝试增加各种内存设置,但可能做得不对
org.gradle.jvmargs=-Xmx8g -XX:MaxPermSize=2048m
是我所拥有的gradle.properties
尝试打开和关闭即时运行。
项目在没有 Kotlin 的情况下构建良好,尝试了 Android Studio 2.0 stable、Kotlin stable、Kotlin EAP 和 AS Canary 构建。
PSgradlew assembleDebug
每次都有效,直到我尝试使用 AS 构建。
编辑:尝试了相同的项目:
- 另一台 Windows 10 PC -> 同样的事情。
- OSX -> 可以正常工作。
有任何想法吗?