icerockdev / moko-template

Template project of a Mobile (Android & iOS) Kotlin MultiPlatform project with the MOKO libraries and modularized architecture
https://moko.icerock.dev/
Apache License 2.0
461 stars 47 forks source link

@Generated bug #8

Open Alex009 opened 4 years ago

Alex009 commented 4 years ago

should be added into root build.gradle:

allprojects {
    afterEvaluate {
        dependencies {
            if(configurations.map { it.name }.contains("compileOnly")) {
                // fix of package javax.annotation does not exist import javax.annotation.Generated in DataBinding code
                "compileOnly"("javax.annotation:jsr250-api:1.0")
            }
        }
    }
}

reason is:

error: cannot find symbol
@Generated("Android Data Binding")
 ^
  symbol: class Generated