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.
Related
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 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.
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
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
I want to use my custom keystore in this project because I intend to host the application in PlayStore and keep it updated. Without the keystore will be tricky.
Details: In the settings cordova, I not marked the "Signed" box and I exported the app and tried signing it using javasign. At the command prompt went well but the app does not install on any of the devices I tested.
The APK created by the Intel XDK is created using standard Cordova CLI. So the techniques you would use to sign that APK are no different than what you would use with any other Cordova (or PhoneGap) app or an APK built using Eclipse or any other tools.
See these links for some useful information:
-- http://developer.android.com/tools/publishing/app-signing.html
-- https://www.scirra.com/tutorials/861/how-to-sign-and-align-your-android-app-apk