Closed Vall0n closed 2 years ago
Thanks for very detailed report. It looks very weird and seems like an issue/limitation in AGP. Anyway I'll keep an eye on it.
Hey, I'm having a similar issue starting from using AGP 7.0.2. Looks like R8 / ProGuard is removing some classes and causing errors.
I'm also experiencing this issue as described.
class PaperTable
This still happens with AGP 7.0.3
. Which contains following changes.
I also tried the sugessetd fix from @TJHello (thanks for that!) to make the class public but it doesn't work sadly.
@pilgr can you prioritize this fix please? I can confirm it's still happening on 7.0.3 AGP version, 7.0.0 is OK though
It looks like this is an R8 issue. If the -allowaccessmodification flag is present in proguard rules. It changes access of the default constructor to public, but keeps the class PaperTable internal:
# direct methods
.method public constructor <init>()V
.registers 1
.line 6
.local p0, "this":Lio/paperdb/PaperTable;, "Lio/paperdb/PaperTable<TT;>;"
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 7
return-void
.end method
And it doesn't allow to create instance into the Kryo library. It helped me to make the default constructor private, this does not allow R8 to change access. Making class public helped me also.
Is this issue fixed now?
Hey folks, sorry for keeping you waiting for the fix for such a long time. The good news – we have the new fixed version to try out. Please refer to this task for instructions and give your feedback https://github.com/pilgr/Paper/issues/196
Hey @pilgr,
first of all thanks for the great library! But I found an issue which breaks my app after upgrading
'com.android.tools.build gradle
(agp) to7.0.2
. It is working with agp7.0.1
, so maybe it's not this library but one of the fixes of agp7.0.2
... See agp 7.0.2 changes especially Desugaring and reproducible buildsOr maybe even in the Kryo, kryo-serializers or objenesis libraries... Which actually are not up to date, which maybe causes the issue here. But I'am just guessing.. 😅
Steps to reproduce
If I can support to fix this issue just let me know or if any information is missing.
Best regards,
Josef