I am using flutter build apk to build apk. Now the apk is not installing on our android device. it was showing like App not installed as shown image.
What may be the issue and how can I solve this?
Verify that you can install 3rd party apps in settings and make sure you have enough space available.
Related
I am releasing apk this way(shown on image)
I have release apk file from build/flutter/Build apk but is not installed in any real devices and its give me error "App is not installed as package appears to be invalid". Can you please help me how to solve this error I am stuck in this problem. This app is run nicely in debug mode from run command.
I have tried this solution:
Uninstall old app and then tried to installed this app
Restart real device and then tried to install this app
Create new apk release file and tried.
Flutter clean and Flutter get done.
Tried to install more than 5 devices but same error in every real device.
I couldn't install flutter app on my android phone. How can I do it? I can run by usb debugging However I want to install it on my phone. Can someone help me please?
If you use IntelliJ Idea (it should also work on Android Studio), you can go to
Build -> Flutter -> Build APK, (in the menu bar)
and after building, your apk will appear in
build/app/outputs/flutter-apk/app-release.apk,
just send the file to your phone and install, your phone will probably tell you not do download cause it isn't checked and secured or something, just ignore and install anyway
Connect your Android device to your computer with a USB cable.
Enter cd [project].
Run flutter install.
Source: here
You need to build the app to get the apk. For building apk use this command in console: flutter build apk and if you want to build your apk in smaller size then use this command in console: flutter build apk --split-per-abi.
After building apk you will find it in [project]\build\app\outputs\flutter-apk\app-armeabi-v7a-release.apk here.
If you don't want to build apk and just want to test your app you can run it in profile mode by using this command in console: flutter run --profile.
In android studio under the tools-> build -> build apk will create and app for you and you can get and the output location will show you after the builing the app
I'm new to flutter and on a phone I have it works and the app runs fine, but I sent the apk to another device and it couldn't be installed, I don't know if it's because of a plugin I'm using that is "speech to speech", since in that plugin I changed the version of min sdk to 21 but the android that I try to install has an android version of 10 that is higher, it seems to me, what would be the cause?
Remember Android no longer accept the app which has not been signed as release,. make sure you are making you are signing the app correctly, Android studio will help you.
The build flavor should be release, and the signature must be created before. But the easiest way is to run the app in profile mode,
flutter run --profile
Profile mode run as release mode but doesn't require to be manually signed.
There could be other reasons but do you know that the Flutter app cannot be installed on x86 Android
Flutter does not currently support building for x86 Android
Am not able to install the APK in my mobile generated by gradle. it's working fine on an emulator but when I try to install on my mobile its starts installing and in the middle, it gives the error APK not installed. Am running android 10. Paths from where I picked the debug APKs are as follow.
<project>/build/app/outputs/apk/debug/app-debug.apk
<project>/build/app/outputs/apk/debug/app.apk
<project>/build/app/outputs/flutter-apk/app-debug.apk
It seems your apk does not have certificate yet.
you cant install it just like that. you can either certify it build release android app
or set your phone to install app form unknown source. in app settings or security settings
If you're trying to manually install the app-debug.apk, you should rather consider generating app-release.apk but if you can't debug the app, then you might considering opening up your developer options.
On this website (https://ionicframework.com/docs/intro/deploying/) I read that I should give this command on the command prompt: ionic cordova run android --prod --release
I tried it but it only tried to start the app on an emulator (I have some problems with it, so it didn't actually start the emulator). Does this command also create a file I can put on my mobile and install the app? I don't want to put the app on Google play, just on my mobile.
I tried putting the android-debug.apk on my mobile and running it but my mobile couldn't install it (.../platforms/android/build/outputs/apk/android-debug.apk)
I'm not trying to test the app on my mobile, I'm trying to install it.
If you want to deploy the apk to your device
ionic cordova run android --device is indeed correct. (try adding --device)
You only need --prod --release when building for production (longer buildtime).
Before running (= building, installing and starting your app) check if your device has USB-debugging enabled. You can check if your device is connected by running adb devices. Since the run command includes building, yes run should create a apk for you.
As you said you also could install the apk manually. Here make sure to use the correct apk. android-debug.apk is the development build (no --release tag) and since your trying to run a production one (--release) you are looking for android-release.apk or android-release-unsigned.apk.
go to settings -> security in your phone then check Unknown sources (Allow installation of apps from sources other than the play store) and try to put the android-debug.apk again. this should work