Error debugging is a pain for this case
See original GitHub issueIm 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:
- Created 6 years ago
- Reactions:19
- Comments:10 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mynote If I could hug you, I would. This thread saved my ass!
oh my god, thx very much @mynote