Closed svepett closed 2 months ago
In our own app, we use this in the Proguard config file:
-keep class org.readium.r2.shared.** { *; }
-dontwarn org.readium.r2.shared.**
-keep class org.readium.r2.streamer.** {*;}
-dontwarn org.readium.r2.streamer.**
-keep class org.readium.r2.navigator.** {*;}
-dontwarn org.readium.r2.navigator.**
-keep class org.readium.r2.opds.** {*;}
-dontwarn org.readium.r2.opds.**
-keep class org.readium.r2.lcp.** {*;}
-dontwarn org.readium.r2.lcp.**
-keep class org.readium.lcp.** {*;}
-dontwarn org.readium.lcp.**
This adds about 1 KB to the AAB.
Disclaimer: I'm not a Proguard expert. If someone has a better solution, please chime in.
Thank you Michael-menu , you are a life safer in a sea of strange code. Feeling like a monkey in a house made of glass. The solution was to not obfuscate the radium files that complained.
Describe the bug
I have inherited an app that has imported the sample app and rewritten some of it.
When Obfuscatiing Android app with the following code:
release { debuggable false minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.releaseConfig } I run into the following exception:
Error: java.lang.InstantiationException : java.lang.Class cannot be instantiated
java.lang.InstantiationException: java.lang.Class cannot be instantiated
at java.lang.Class.newInstance(Native Method)
at org.nanohttpd.router.RouterNanoHTTPD$UriResource.process(RouterNanoHTTPD.java:380)
at org.nanohttpd.router.RouterNanoHTTPD$UriRouter.process(RouterNanoHTTPD.java:597)
at org.nanohttpd.router.RouterNanoHTTPD.serve(RouterNanoHTTPD.java:672)
at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:376)
at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:372)
at org.nanohttpd.protocols.http.NanoHTTPD.handle(NanoHTTPD.java:535)
at org.nanohttpd.protocols.http.HTTPSession.execute(HTTPSession.java:418)
at org.nanohttpd.protocols.http.ClientHandler.run(ClientHandler.java:75)
at java.lang.Thread.run(Thread.java:1012)
I would appriciate some idea of what could be the reason
How to reproduce?
Readium version
2.2.1
Android API version
14
Additional context
No response