Open himanshuthakkar2781 opened 5 years ago
2019-03-22 16:38:30.473 30586-30586/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.gurumaa.amritvarsha, PID: 30586
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method b.e.b.j.b, parameter href
at org.readium.r2.a.i.
-ignorewarnings
-keep class android.support.design.internal.BottomNavigationItemView{ ; } -keep class android.support.design.internal.BottomNavigationMenuView{ ; }
-keep class android.support.v4.app. { *; } -keep interface android.support.v4.app.* { ; } -keep class com.actionbarsherlock. { *; } -keep interface com.actionbarsherlock.* { ; }
-keep class com.shockwave.**
Step 1 - If I use the proguard file as above, app crashes immediately on clicking search. Step 2 - If I uncomment the commented lines above, the app does not crash though, but the search result shows NULL. It would be great if u could help...
i am using this proguard-rules.pro @himanshuthakkar2781
#Event Bus
-keepattributes *Annotation*
-keepclassmembers class * {
@org.greenrobot.eventbus.Subscribe <methods>;
}
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
# Only required if you use AsyncExecutor
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
<init>(java.lang.Throwable);
}
i am using this search class android.support.v7.widget.SearchView
-keep class android.support.v7.widget.SearchView { *; }
this not work then try this
-keep class android.support.v7.widget.** { *; }
Tried the proguard rules mentioned above - Still get the following error below---
2019-03-23 20:37:06.890 21119-21119/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.gurumaa.amritvarsha, PID: 21119 b.t: null cannot be cast to non-null type com.folioreader.ui.view.FolioSearchView at com.folioreader.ui.activity.SearchActivity.onCreateOptionsMenu(SearchActivity.kt:226) at android.app.Activity.onCreatePanelMenu(Activity.java:3146) at androidx.f.a.e.onCreatePanelMenu(FragmentActivity.java:378) at androidx.appcompat.view.i.onCreatePanelMenu(WindowCallbackWrapper.java:94) at androidx.appcompat.app.h$d.onCreatePanelMenu(AppCompatDelegateImpl.java:2549) at androidx.appcompat.view.i.onCreatePanelMenu(WindowCallbackWrapper.java:94) at androidx.appcompat.app.l.l(ToolbarActionBar.java:455) at androidx.appcompat.app.l$1.run(ToolbarActionBar.java:56) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6165) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)
-keep class com.folioreader.ui.view.FolioSearchView { *; }
or
-keep public class * extends androidx.appcompat.widget.SearchView { *; }
should do the trick
Issue / Feature - FolioReader version - 5.4 FolioReader Stock / Modified -
Android SDK - Mobile / Tablet / Emulator Info - Moto g play
Crash / Error - b.t: null cannot be cast to non-null type com.folioreader.ui.view.FolioSearchView at com.folioreader.ui.activity.SearchActivity.onCreateOptionsMenu(SearchActivity.kt:226) crashes when search.txt
Steps to reproduce / Describe in detail -