Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
When I wrote data class with inline class inside like this:
inline class TheSubject(val value: String) @Parcelize data class TestObject(val subject: TheSubject) : Parcelable
Then, when I put this data class into Intent and start new Activity, when I tried to get my data class from extras next error occurs
java.lang.IllegalAccessError: Method 'void lib.qbikkx.myapplication.TestObject.<init>(java.lang.String)' is inaccessible to class 'lib.qbikkx.myapplication.TestObject$Creator' (declaration of 'lib.qbikkx.myapplication.TestObject$Creator' appears in /data/app/lib.qbikkx.myapplication-dhLVY0da2tfeEtTgvAi5JA==/base.apk) at lib.qbikkx.myapplication.TestObject$Creator.createFromParcel(Unknown Source:11)
But if I put this data class in fragment arguments - everything is ok.
Here is a sample repository with both cases. Start Activity and Fragment -https://github.com/qbikkx/ParcelizeInlineClass
Exact file -https://github.com/qbikkx/ParcelizeInlineClass/blob/master/app/src/main/java/lib/qbikkx/myapplication/MainActivity.kt
Android Studio - 4.1.1 Kotlin - 1.4.30-RC