Giter Site home page Giter Site logo

Comments (12)

andrikeev avatar andrikeev commented on May 18, 2024

Error:

Error:17:51:47.150 [ERROR] [system.err] ..\presentation\view\LceView$$State.java:10: error: illegal start of type
17:51:47.150 [ERROR] [system.err] public class LceView$$State extends MvpViewState implements LceView<[M]> {
17:51:47.150 [ERROR] [system.err] ^

from moxy.

senneco avatar senneco commented on May 18, 2024

@xanderblinov have you a guess what happened there? I didn't use kotlin 🙈

from moxy.

senneco avatar senneco commented on May 18, 2024

@valeragit could you attach archived project? I dont have time to make kotlin sample project, but your sample can help to fix this issue.

from moxy.

xanderblinov avatar xanderblinov commented on May 18, 2024

Hi guys! @valeragit could you try to replace kotlin class with java to determine error in kotlin implementattion or not?

from moxy.

andrikeev avatar andrikeev commented on May 18, 2024

I created sample project https://github.com/valeragit/KotlinMoxySample

could you try to replace kotlin class with java
I'll try later

from moxy.

andrikeev avatar andrikeev commented on May 18, 2024

I tried switch MainPresenter and MainActivity to plain java, it didn't work. Still can't generate proper LceView$$State class

from moxy.

senneco avatar senneco commented on May 18, 2024

Could you get stacktrace/error message?

from moxy.

andrikeev avatar andrikeev commented on May 18, 2024
Error:18:08:12.498 [ERROR] [system.err] E:\projects\KotlinSample\app\build\generated\source\kapt2\debug\ru\andrikeev\android\kotlinsample\presentation\view\LceView$$State.java:10: error: illegal start of type
18:08:12.498 [ERROR] [system.err] public class LceView$$State<M> extends MvpViewState<LceView> implements LceView<[M]> {
18:08:12.498 [ERROR] [system.err]                                                                                 ^
18:08:12.499 [ERROR] [system.err] E:\projects\KotlinSample\app\build\generated\source\kapt2\debug\ru\andrikeev\android\kotlinsample\presentation\view\LceView$$State.java:10: error: '{' expected
18:08:12.499 [ERROR] [system.err] public class LceView$$State<M> extends MvpViewState<LceView> implements LceView<[M]> {
18:08:12.499 [ERROR] [system.err]                                                                                  ^
18:08:12.499 [ERROR] [system.err] E:\projects\KotlinSample\app\build\generated\source\kapt2\debug\ru\andrikeev\android\kotlinsample\presentation\view\LceView$$State.java:10: error: illegal start of type
18:08:12.499 [ERROR] [system.err] public class LceView$$State<M> extends MvpViewState<LceView> implements LceView<[M]> {
18:08:12.500 [ERROR] [system.err]                                                                                   ^
18:08:12.500 [ERROR] [system.err] E:\projects\KotlinSample\app\build\generated\source\kapt2\debug\ru\andrikeev\android\kotlinsample\presentation\view\LceView$$State.java:10: error: <identifier> expected
18:08:12.500 [ERROR] [system.err] public class LceView$$State<M> extends MvpViewState<LceView> implements LceView<[M]> {
18:08:12.500 [ERROR] [system.err]                                                                                    ^
18:08:12.500 [ERROR] [system.err] E:\projects\KotlinSample\app\build\generated\source\kapt2\debug\ru\andrikeev\android\kotlinsample\presentation\view\LceView$$State.java:10: error: ';' expected
18:08:12.500 [ERROR] [system.err] public class LceView$$State<M> extends MvpViewState<LceView> implements LceView<[M]> {
18:08:12.500 [ERROR] [system.err]                                                                                     ^
18:08:12.504 [ERROR] [system.err] 5 errors
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] 
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] 
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:compileDebugJavaWithJavac'.
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] > Compilation failed; see the compiler error output for details.
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] 
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
18:08:12.510 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 

Generated LceView$$State is similar to one from start post

from moxy.

andrikeev avatar andrikeev commented on May 18, 2024

It seems that there is a problem of generating ViewState for parameterized View. And problem is not related to Kotlin.
Simple workaround is to add one more interface that implements parameterized View with necessary type.

from moxy.

senneco avatar senneco commented on May 18, 2024

Oh, yes. Currently Moxy doesn't generate code for typed View. It's old issue, but still is in short list. There several problems to determine View type in annotation processor. We working on it.

You can contribute these feature to Moxy – annotation processor is much fun 😄

from moxy.

andrikeev avatar andrikeev commented on May 18, 2024

I try to figure out how to do it =)

from moxy.

senneco avatar senneco commented on May 18, 2024

This is published in version 1.4.6.

from moxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.