question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error debugging is a pain for this case

See original GitHub issue

Im not sure if this is a “Bug”, but after days of debugging, using several dagger architectures and so on i figured out why room throws the error

error: Entities and Pojos must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type).

I was not able to find the error using gradle. Even after using verbose assembleDebug there was no way to figure out why its just throwing a bunch of errors.

The reason for the error was, that i have in one Entitity

public class MyClass {
    @Embedded  private List<Condition> conditions;
}

@TypeConverter public static List<Condition> stringToConditionList(String data) {
        return GsonUtil.gson().fromJson(data, new TypeToken<List<Condition>>() {
        }.getType());
    }

@TypeConverter public static String fromConditionList(List<Condition> data) {
        return GsonUtil.gson().toJson(data);
    }

Since i have created a typeconverter which converts to string and back, its of course not possible to have embedded classes. Anyway, it was not possible to find any way to get the proper location for this.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:19
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
elvircrncommented, Jun 12, 2017

@mynote If I could hug you, I would. This thread saved my ass!

0reactions
fathansatriacommented, Jun 29, 2020

oh my god, thx very much @mynote

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging pain : r/ProgrammerHumor - Reddit
But it usually gives you a decent clue where or what the problem is, and if not, you can revert in stages or...
Read more >
Afraid of Debugging? 5 Tips to Make Debugging Less Painful
1. Be relieved you're not alone—All coders face this · 2. Be excited to learn—Debugging helps you grow · 3. Be relentless—You can't...
Read more >
Error Handling and Debugging Tips and Techniques for ...
Implementing Error Handling and Debugging Techniques for Microsoft Access, VBA, and Visual Basic ... This makes finding and fixing the problem a real...
Read more >
Reading 11: Debugging - MIT
Start by finding a small, repeatable test case that produces the failure. ... would be very painful to debug by normal methods, like...
Read more >
CS101: Documentation, Testing, and Debugging
Debug on a small scale. Thoroughly test each component of an application (each method of each object) piece by piece, correcting errors as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found