Android Studio Kotlin Compiler warning

2019-03-27 09:54发布

问题:

I found warning in Kotlin Compiler settings

Following modules override project settings: app

Project compiles and works perfect but can this warning make affect in future? And how to solve this.

Thanks in advance.

回答1:

Open ProjectFolder/app/app.iml and edit the following node, changing useProjectSettings to true.

<facet type="kotlin-language" name="Kotlin">
  <configuration version="3" platform="JVM 1.6" useProjectSettings="true">
    <compilerSettings />
    <compilerArguments>
      <option name="destination" value="$MODULE_DIR$/build/tmp/kotlin-classes/debug" />
      <option name="noStdlib" value="true" />
      <option name="noReflect" value="true" />
      <option name="moduleName" value="app_debug" />
      <option name="addCompilerBuiltIns" value="true" />
      <option name="loadBuiltInsFromDependencies" value="true" />
      <option name="languageVersion" value="1.2" />
      <option name="apiVersion" value="1.2" />
      ...
    </compilerArguments>
  </configuration>
</facet>