0

I updated spring-dotenv to 2.5.3 from 1.0.0 like below build.gradle.

dependencies {
    implementation 'me.paulschwarz:spring-dotenv:2.5.3'
}

then, I execute ./gradlew build happened IncompatibleClassChangeError.

java.lang.IncompatibleClassChangeError at DotenvPropertyLoader.java:11

Why caused this error?

I have seen other answers like below. But I can't solve this problem.
What causes java.lang.IncompatibleClassChangeError?

Does anyone have any idea? Thanks.

sho
  • 133
  • 8

1 Answers1

0

I solved this problem. I edited build.gradle like below.

// before
implementation ('me.paulschwarz:spring-dotenv:2.5.3')
// after
api ('me.paulschwarz:spring-dotenv:2.5.3')

but, I don't know why this solved it.

sho
  • 133
  • 8