-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use in kotlin:Error:(8, 1) 错误: @InjectExtra fields must not be private or static. #186
Comments
when i use gradle3.0.1
and in build/tmp/kapt3/stubs/.../DartTestActivity.java
|
@fansmc I reformatted your first ticket, if you wanna check how to do it for future issues.. ;) |
Unfortunately, I am not knowledegeable enough in Kotlin to understand the issue, but it's not related to Dart or Henson. Be sure to use the latest kotlin version, clean your project, and look for support in the Kotlin community. |
TKS. very much , i just don't understand why ,the 'var' in kotlin will compile to 'private' in java. |
resolve...
|
@fansmc this should work.
|
@fansmc to understand the issue you need to understand how Kotlin is compiled in Java (see https://kotlinlang.org/docs/reference/java-to-kotlin-interop.html).
As @StephenVinouze pointed out, if you need to expose a Kotlin property as a public field in Java, you can use
However, the above approach will work only as long as your intent's extras is non-nullable.
|
add and in dependencies :
using:
|
i use gradle 2.3.0 whith android studio 3.0
build.gradle
DartTestActivity.java
run make model this error appear:
and in
build/tmp/kapt3/stubs/.../DartTestActivity.java
why the "mTitle" is private ?
The text was updated successfully, but these errors were encountered: