Skip to content
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

Ошибка при сборке проекта "error: cannot find symbol import examplePackage.MetaModel$ProfileScreenMetaModel;" #135

Open
aaudin90 opened this issue Jul 9, 2021 · 5 comments

Comments

@aaudin90
Copy link

aaudin90 commented Jul 9, 2021

При сборке проекта с некоторой вероятностью в сгенерированном классе ProfileView$$State не находит нужный импорт на класс MetaModel.ProfileScreenMetaModel

В функции интерфейса MvpView используется тип MetaModel.ProfileScreenMetaModel

data class MetaModel(
    val verificationScreen: VerificationScreenMetaModel?,
    val restrictionsScreen: RestrictionsScreenMetaModel?,
    val profile: ProfileScreenMetaModel?
) {
    data class VerificationScreenMetaModel(val title: String, val description: String)
    data class RestrictionsScreenMetaModel(val title: String, val description: String)
    data class ProfileScreenMetaModel(val title: String, val description: String)
}

Ошибка возникает примерно в 3-5% сборках и только с этим вложенным классом.
gradle plugin 4.1.3
moxy 2.2.2
kotlin 1.4.31

Текст ошибки:

examplePath1/ProfileView$$State.java:4: error: cannot find symbol
import examplePackage.MetaModel$ProfileScreenMetaModel;
^
symbol: class MetaModel$ProfileScreenMetaModel
location: package examplePackage/examplePath/ProfileView$$State.java:357: error: cannot find symbol
public void setKycWidgetData(MetaModel$ProfileScreenMetaModel arg0, StatusType arg1,
^
symbol: class MetaModel$ProfileScreenMetaModel
location: class ProfileView$$State/examplePath/ProfileView$$State.java:765: error: cannot find symbol
public final MetaModel$ProfileScreenMetaModel arg0;
^
symbol: class MetaModel$ProfileScreenMetaModel
location: class ProfileView$$State.SetWidgetDataCommand/examplePath/ProfileView$$State.java:771: error: cannot find symbol
SetWidgetDataCommand(MetaModel$ProfileScreenMetaModel arg0, StatusType arg1,
^
symbol: class MetaModel$ProfileScreenMetaModel
location: class ProfileView$$State.SetWidgetDataCommand

@alaershov
Copy link
Member

можете приложить соответствующий View и Presenter?

@aaudin90
Copy link
Author

aaudin90 commented Jul 9, 2021

Боюсь, что нет, но там нет какой-то специфики, все стандартно в плане moxy.
Могу приложить команду из интерфейса view

    @Skip
    fun setWidgetData(
        meta: MetaModel.ProfileScreenMetaModel
    )

@alaershov
Copy link
Member

Если ошибка нестабильная, это больше похоже на проблему капта. А опции компиляции мокси какие-то используете, moxyEnableIsolatingProcessing : 'true' например?

@aaudin90
Copy link
Author

опции компиляции не используем.

@dmersiyanov
Copy link

dmersiyanov commented Sep 7, 2021

У меня возникает похожая проблема.

Использую sealed класс как параметр одного из методов view.

image

image

Далее в сгенерированном классе CourierTrackingMapView$$State.java получаю ошибку при сборке:

cannot find symbol class CourierInfo$Courier

Снимок

image

AGP 7.0.2
moxy 2.2.2
kotlin 1.5.21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants