question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This annotation is not applicable to target 'member property without backing field or delegate'

See original GitHub issue

adsiz

apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'

group 'org.example'
version '1.0-SNAPSHOT'

buildscript {
    ext.kotlin_version = '1.2.0'

    repositories {
        mavenCentral()
        jcenter()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

sourceCompatibility = 1.8

repositories {
    mavenCentral()
    jcenter()
}

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

kapt {
    generateStubs = true
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    testCompile group: 'junit', name: 'junit', version: '4.12'

    implementation 'com.google.code.gson:gson:2.8.2'
    implementation 'com.google.dagger:dagger:2.4'
    kapt 'com.google.dagger:dagger-compiler:2.4'

    implementation 'com.github.davidmoten:rxjava2-jdbc:0.1-RC23'
    implementation 'ch.qos.logback:logback-classic:1.2.3'

    implementation 'org.xerial:sqlite-jdbc:3.21.0.1'
}

compileKotlin { kotlinOptions.jvmTarget = "1.8" }
compileTestKotlin { kotlinOptions.jvmTarget = "1.8" }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
davidmotencommented, Dec 14, 2017

I had no problem using automap with Kotlin. See here.

I notice that you were using a val rather than a fun declaration in the interface. Perhaps that’s why you had a problem.

I’ve now added a kotlin sample to the project build so if it stops working I’ll know!

0reactions
davidmotencommented, Nov 7, 2018

@rlperez Please add comments on your issue as this one is closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

This annotation is not applicable to target member property ...
This annotation is not applicable to target member property without backing field or delegate. How do I correct this?
Read more >
Problem with lazy loading and lack of a backing field - Support
Kotlin : This annotation is not applicable to target 'member property without backing field'. Not a big deal, but was wondering if there...
Read more >
"This annotation is not applicable to target 'file' and use site ...
This error occurs only for 'file' target if annotation isn't annotated by @Target. Retention changes nothing. This issue is very critical for me...
Read more >
annotation leads to "This annotation is not applicable to target ...
Coding example for the question @Index annotation leads to "This annotation is not applicable to target 'member property with backing field'"-kotlin.
Read more >
Backing Field in Kotlin - Suneet Agrawal
Backing field is an autogenerated field for any property which can only be used inside the accessors(getter or setter) and will be present...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found