1

I get apk debug output flutter in Android Studio, but it doesn't install on any device. But it runs in Android Studio on my device. What is the problem? The previous version is on Google Play. I upgraded the code version and the application version, but it does not install on any device.

I even created a new project and got apk debug output. Again, it won't install on any device

Unfortunately, I tried all the cases, but it didn't work flutter.versionCode=2 flutter.versionName=2.0.0 flutter.minSdkVersion = 19 flutter.targetSdkVersion = 30 my version android device 12

android 7 installed android 12 not installed

1 Answers1

1

The reason could be that you're building playstore signed apk and trying to install it in your phone directly which won't work.

In your android/app/build.gradle, make sure you have the following code:

buildTypes {
....
   release {
       ....
       signingConfig signingConfigs.debug 
       // change it to signingConfigs.release when building bundle for playstore
   }

}

Now build apk using flutter build apk and in your build > app > outputs > flutter apk > app-release.apk should work now

Muhammad Hussain
  • 966
  • 4
  • 15