Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
How to use suspend modifier in Room Dao after kotlin upgrade to 1.6.0?

Upgrading kotlin to 1.6.0 causes Room Dao suspend modifier to break build project with error: "Not sure how to handle query method's return type........".

Are there(here) any solutions other than a workaround for running Dao functions withContext(Disapatchers.IO) in repository?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I faced the same issue yesterday with the upgrade of Kotlin 1.6.0.

My working project started to fail, same error messages.

After searching in some other forums someone mentioned to change roomVersion to "2.4.0-beta02". And.. surprisingly it worked! At least it compiled without any more issues.

Try it , hopefully it will work for you too.

Mine is defined in a variable:

def roomVersion = "2.4.0-beta02"

So the rest of the dependencies for Room should take advantage of this change.

over 4 years ago · Santiago Trujillo Relatório

0

The new Kotlin compiler (aka 1.6.+) needs room version 2.4.0 at least to support the language. So Upgrade your room dependency to 2.4.0.

And since you are using the version of room you also have to target Android API 31.

Room 2.4.0 changes

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda