Overload Resolution Ambiguity error in kotlin

前端 未结 5 512

How do I fix this Overload error, I have Overload Resolution Ambiguity error, I sync it in my project and clean it and rebuild it but it\'s get me bellow error ,I add main

5条回答
  •  甜味超标
    2021-01-01 09:20

    This means that resource ids in java files from xml files are not properly imported, or are imported with wrong xml resource id files because of same name.

    Suppose for

    ----activity_login 
    ----activity_main 
    

    there is a textview with same id.

    Kotlin imports tries to search every xml file ids, and the id gets wrongly imported.

    Solution:: Remove all imports after copy/paste and follow alt+enter one by one.

提交回复
热议问题