每一次对lin子案的改动都导致在建房时出现重复申报错误。 唯一的办法是清理项目,然后进行重建。 该项目没有其他文件,其名称与我正在编辑的档案相同。
我已尝试:
- Renaming the class I have been working on
- Upgrading and downgrading the version of kotlin, gradle and kotlin plugin in Android Studio
- Using beta Android Studio
- Reordering the plugins in my gradle file
The current build is using:
org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21
com.android.tools.build:gradle:3.2.0
Example code that will cause the error. If I build without the addedThisLine
it works as its the first build. Then when I edit the file in anyway it will cause the error below.
package beagle.com
class ErrorFragment {
val hello = "Hello"
init {
var goodbye = "goodbye"
var addedThisLine = "When this line is added I get error"
}
}
Irror
在我的项目中,每科特林档案中都出现这种情况,我前面的法典是最基本的文件。 你们可以看到,这错了班子的名称。