epub_kitty icon indicating copy to clipboard operation
epub_kitty copied to clipboard

Force close after build apk

Open culunvb opened this issue 4 years ago • 7 comments

Hi everyone, I found the issue in pub_kitty, when I compile for release version , my application force closed when read ePub file in reader

Would you like to help me for that issues

culunvb avatar Mar 03 '20 09:03 culunvb

mybe you epub file path is not read correctly or epub file had some problems.

451518849 avatar Mar 03 '20 11:03 451518849

Epub file path was correctly and for the epub file there is no problem I found, because when I open again my application is running well. Can you solve my problem 451518849

Thank you

culunvb avatar Mar 03 '20 23:03 culunvb

What version do you use and what device and device of system do you run ?

451518849 avatar Mar 04 '20 02:03 451518849

this pubspec.yaml configuration :

The following adds the Cupertino Icons font to your application.

Use with the CupertinoIcons class for iOS style icons.

cupertino_icons: ^0.1.2 http: ^0.12.0+4 sqflite: any url_launcher: any font_awesome_flutter: ^8.7.0 flutter_spinkit: ^4.1.2 percent_indicator: ^2.1.1+1
badges: ^1.1.0
flutter_launcher_icons: ^0.7.4
rxdart: any carousel_slider: ^1.4.1 intl: ^0.16.1 intro_views_flutter: ^2.8.0
package_info: any xml2json: ^4.1.1 uuid: ^2.0.4 objectdb: ^1.0.7+1
epub_kitty: ^0.1.0 path_provider: ^1.4.0 dio: ^3.0.8 permission_handler: ^4.3.0

and I run on device Samsung S8, A7 (2016), Note 9

culunvb avatar Mar 05 '20 08:03 culunvb

I have solved it by adding following lines in build.gradle

buildTypes { release { signingConfig signingConfigs.debug shrinkResources false minifyEnabled false useProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }

then create a proguard-rules.pro file in app folder and add these lines

-keepattributes Annotation -keepclassmembers class ** { @org.greenrobot.eventbus.Subscribe ; } -keep enum org.greenrobot.eventbus.ThreadMode { *; }

obitors avatar May 13 '20 20:05 obitors

I, too, faced the same issue. It was running fine in emulator whereas in real devices the app crashed while opening the epub file. Then I followed the workaround as mentioned above by obitors and it solved my issue.

saptha avatar Jun 06 '20 03:06 saptha

I, too, faced the same issue. It was running fine in emulator whereas in real devices the app crashed while opening the epub file. Then I followed the workaround as mentioned above by obitors and it solved my issue.

where should we add it? in the gradle of epub_kitty repo or in our flutter app?

marcqtan avatar Aug 13 '20 09:08 marcqtan