@endigo I am not doing much complex stuff only reading the pdf and displaying.
It works fine in all mode debug and profile, release but when i deployed it on playstore, it crashes.
In your readme.md you said if using proguard then add line:-
-keep class com.shockwave.**,. my project doesn't contains proguard, so in build .gradle file
`rdef localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
//apply plugin: 'com.android.library'
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "<app package name>"
multiDexEnabled true
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
useProguard false
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-messaging:20.2.0'
}
`
also i have only one screen and its job is to display pdf, here it is
`@override
Widget build(BuildContext context) {
if(widget.path != null && widget.path.compareTo("@") == 0) //... it can only happen when file doesn't exists and neither the internet connection
Navigator.of(context).pop();
return Scaffold(
backgroundColor: Theme.of(context).backgroundColor,
body: (widget.path == null)
? getLoading()
: Stack(
children: [
PDFView(
filePath: widget.path,
autoSpacing: true,
enableSwipe: true,
pageSnap: true,
swipeHorizontal: true,
nightMode: MyAppState.darkTheme,
onError: (e) {
print(e);
},
onRender: (_pages) {
setState(() {
pdfReady = true;
});
},
onViewCreated: (PDFViewController vc) {
_pdfViewController = vc;
},
onPageChanged: (int page, int total) {
setState(() {});
},
onPageError: (page, e) {},
),
],
),
);
}`
and this is the error i got from play console:-
pid: 0, tid: 0 >>> <<<
backtrace:
#00 pc 00000000000220ec /system/lib64/libc.so (abort+116)
#01 pc 0000000000465c98 /system/lib64/libart.so (art::Runtime::Abort(char const*)+1196)
#02 pc 0000000000008ce0 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+724)
#03 pc 00000000002e5ec8 /system/lib64/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+1640)
#04 pc 0000000000332cd8 /system/lib64/libart.so (art::JNI::GetMethodID(_JNIEnv*, _jclass*, char const*, char const*)+1464)
#05 pc 0000000000004620 /data/app/
--g9v7l0jhzEj_95rtekdOg==/split_config.arm64_v8a.apk (offset 0xfd3000) (Java_com_shockwave_pdfium_PdfiumCore_nativeGetPageSizeByIndex+328)
#06 pc 0000000000000704 /data/app/--g9v7l0jhzEj_95rtekdOg==/oat/arm64/base.odex (offset 0x1a000)
I tested the app with flutter run --release on a device, then published the appbundle generated from flutter build appbundle --release, i guess it might be the problem with splitted apks as you can see i have bolded in above error from play console,.. i would really appreciate a help please
need more information