Android release crash with exception net.sqlcipher.database.SQLiteException
Asked Answered
B

1

7

I've uploaded my app to play store but it still crashes as "crash report image" of developer console shows.

on some devices the app did not lunch at all

while on other it crashes when start sql query

btw proguard is disabled

crash report image crash report image

the query method query

Broucek answered 24/4, 2022 at 3:0 Comment(0)
B
-1

There are two main crash exceptions

1. SQLiteException

and I've solved this by comment the proguardfiles in Build.gradle as follow

 buildTypes {
        release {
            minifyEnabled false
            //proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

2. illegalargumentexception

If you let your app to run in android 12 and app has notification feature, there is a new PendingIntent mutability flag

PendingIntent pendingIntent;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        pendingIntent = PendingIntent.getActivity(this,0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);

        //pendingIntent = PendingIntent.getActivity(this,0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);
}
else{
        pendingIntent = PendingIntent.getActivity(this,0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
}
Broucek answered 26/4, 2022 at 19:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.