Tag Archives: Kotlin

[Solved] Flutter Error: fluwx:compileDebugKotlin

Flutter reports an error fluwx:compileDebugKotlin

Cause Analysis

The reason for this exception found on the Internet is basically that the kotlin version does not conform to the cause, Maybe the kotlin version will also cause this error.
But my error is not due to the kotlin version problem, but due to the conflict of the component cache version pulled down by the pub command, as shown below:
insert picture description here
fluwx-3.9.1 and 3.9.2, delete and yml file Inconsistent versions resolve this exception.

Summary

Component name: There may be two reasons for the exception of compileDebugKotlin:
1. The kotlin version often said on the Internet does not conform to
2. There are different versions of the components in the pub cache and they conflict

Differences between Java and kotlin access modifiers

modifiers

Java

Kotlin

public

all kind of visible

all kind of visible (the default)

private

current class visible

current class visible

prote Cted

the current class, subclass, class is visible under the same package path

the current class, subclass visible

default

class visible (the default) under the same package path

no

internal

no

class is visible in the same module