I got the apk output from the program using the following code
flutter build apk --split-per-abi --obfuscate --split-debug-info=<directory>
Instead of , I wrote the storage path and got three output files, in addition to --obsfucate, the codes may have been obscured. Now I created a keystore using the following code
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
Instead of a nickname, I put the desired name of my key and entered the required information by pressing enter.
Now I put the app-armeabi-v7a-release.apk file next to this key and wrote the following code
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app-armeabi-v7a-release.apk alias_name
And instead of alias_name, I wrote the name of my key and after pressing enter, it showed the following text
jar signed.
Warning: The signer's certificate is self-signed. The SHA1 algorithm specified for the -digestalg option is considered a security risk and is disabled. The SHA1withRSA algorithm specified for the -sigalg option is considered a security risk and is disabled. POSIX file permission and/or symlink attributes detected. These attributes are ignored when signing and are not protected by the signature.
But now when I put the apk file in every phone, it says there is a problem in parsing the package.
The first thing I noted is, that you use jarsigner. The recommended way to sign your APK file via CLI is to use apksigner, which is part of the official Android SDK Command Line Tools (this link may solve other problems too) and, of course, of Android Studio's APK building toolchain. Take a look at the Android Dev Docs how to sign your APK manually.
The thing is, that jarsigner neither supports the newer APK signing schemes nor does it have a clue about some specifics like that APKs which have need to run on API Level <= 17 must not use SHA-256. So, I assume that using apksigner with the proper options (esp. signing scheme) will solve the problem.