Skip to content

Commit 050e851

Browse files
committed
ADFA-5500: Keep the app libraries the layout editor plugin still loses to R8
The GlitchTip issue (CODEONTHEGO-F2, and F3/F4/G4/GQ with the same cause) is a layout editor view failing to inflate in release builds: NoSuchMethodException on NavigationRailView(Context, AttributeSet), then the "Missing required view" NPE from the plugin's view binding. Plugins load parent-first, so they get the app's shrunk copy of a library it shares with them. ADFA-5731 (#1830) fixed that class by keeping com.google.android.material whole; all 178 events come from releases built before it. The same failure is still on stage for other shared libraries. Checking layout-editor.cgp's references against the stage release dex, and against an unshrunk debug dex to rule out version skew, finds members R8 strips that the plugin reaches: - sora CodeEditor(Context, AttributeSet), inflated by the Show XML screen: the same inflation failure and NPE as this issue - CardView(Context) and ViewPager(Context), constructed by the CardView and ViewPager palette items: NoSuchMethodError - 14 sora members (Span.setExtra, Logger, ...) called by the plugin's bundled TextMate highlighter: NoSuchMethodError Keep io.github.rosemoe.sora, androidx.cardview and androidx.viewpager.widget whole, like the other shared libraries.
1 parent 2a8eff5 commit 050e851

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎app/proguard-rules.pro‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@
257257
-keep class io.noties.markwon.** { *; }
258258
-keep class com.google.gson.** { *; }
259259
-keep class org.snakeyaml.engine.** { *; }
260+
-keep class io.github.rosemoe.sora.** { *; }
261+
-keep class androidx.cardview.** { *; }
262+
-keep class androidx.viewpager.widget.** { *; }
260263

261264
-keep class com.google.firebase.** { *; }
262265
-keep class com.google.android.gms.** { *; }

0 commit comments

Comments
 (0)