1

When I run flutter build apk --release everything works just fine, In addition when I connect my phone to the computer and run flutter install -v everything is ok. Also when I run flutter run -v my app is working on my phone just fine.

BUT when I'm sending the apk manually to my phone, install and open my app, it's stuck on the splash screen.

I don't know what can case it not to work manually (since I cannot track my logs).

  • I'm using firebase, my google-services.json is up to date.
  • flutter doctor is just fine.
  • android SDK version 30.0.2.
  • app/build.gradle compileSdkVersion 30.
  • gradle version 6.6.1.
  • classpath 'com.google.gms:google-services:4.3.5'
  • classpath 'com.android.tools.build:gradle:4.0.2'

Any suggestions how to validate my application? What can case such a problem?

Thanks you!!!

More Information

The only error on flutter run is:

Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.name.name signatures do not match previously installed version; ignoring!]

but as I said before the flutter run do works and my app uploads correctly, so I think it is not related to my problem.

genericUser
  • 4,417
  • 1
  • 28
  • 73

2 Answers2

0

Have You implemented release SHA keys ?

Nedim Karavdic
  • 212
  • 1
  • 2
  • 10
  • Yes I have checked that my flutter project SHA keys are same as my gradle signature release SHA – genericUser Mar 10 '21 at 22:15
  • Keep in mind that there are two types of SHA keys. For debugging and for release, I also encountered this bug once and in my case it was because my SHA keys were not entered in Firebase. Make sure to put both of them especially if You are using google authentication on Firebase – Nedim Karavdic Mar 10 '21 at 22:17
  • If the above does not help make sure to check out this answer: https://stackoverflow.com/questions/41709102/package-signatures-do-not-match-the-previously-installed-version – Nedim Karavdic Mar 10 '21 at 22:21
  • First of all thanks for the help @Nedim Karavdic. I have just checked and my release and debug SHA keys are placed on firebase correctly. – genericUser Mar 10 '21 at 22:22
  • Several devs had same problem with their projects, one of the things that worked for vast majority of them was the command : adb uninstall "com.domain.yourapp" – Nedim Karavdic Mar 10 '21 at 22:25
  • I run that command and it does solved my "signatures do not match previously installed version; ignoring!" error on `flutter run` but still my problem is to run the app manually (also my new users, who had never installed the app, are facing the same problem). But I think you were right that the problem may be due to authentication failure, I'm just checking this out at the very moments. – genericUser Mar 10 '21 at 22:30
  • What type of authentication are You using ? – Nedim Karavdic Mar 10 '21 at 22:30
  • sms verification – genericUser Mar 10 '21 at 22:31
  • SMS verification can be tested only on real devices, emulators are not able to do it – Nedim Karavdic Mar 10 '21 at 22:32
  • Yes I wrote on my question "when I connect my phone to the computer ". Sorry for not been clear with that. I'm using my physical device. – genericUser Mar 10 '21 at 22:33
  • Check this url, there are several possible answers, just make sure to notify me if one of them works: https://stackoverflow.com/questions/41709102/package-signatures-do-not-match-the-previously-installed-version – Nedim Karavdic Mar 10 '21 at 22:36
  • I have tried this issue but I really think it is not related to my problem. This link supports debug run while I'm trying to achieve release running. – genericUser Mar 10 '21 at 22:39
0

After many tests using flutter run -v I encountered that in some cases I'm getting:

Unhandled exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)

I do work with shared_preferences package and that answer sure solve my problem https://stackoverflow.com/a/63027655/12695188

Although this is a specific solution I will describe what I have done in order to find my problem:

  1. flutter pub get
  2. flutter build apk --debug
  3. flutter build apk --profile
  4. flutter build apk --release
  5. connect your physical device to your computer
  6. flutter install -v (to your physical device)
  7. flutter run -v

Solve each problem you find on flutter run -v.

Hope this will help someone out there.

genericUser
  • 4,417
  • 1
  • 28
  • 73