I just built a simple app, and generated APK using following command:
ionic cordova build android
I downloaded this APK to my mobile, and trued to install. It was showing following error:
Failed to install app
Please help me.
My ionic version:3.9.2
Cordova:7.0.1
npm:3.10.10
Node: 6.11.0
Angular: 5.0.0
Typescript: 2.4.2
Check the config file. I think same id used for install app. Change the id for config file like below:
<widget id="com.ionic.app" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
Related
following the official getting started tutorial I get the following error when I try to deploy the application in my phone using this command: ionic serve --devapp (it works on browser):
[ERROR] Could not find cordova integration in the default project.
I get this error both on Windows and MacOS.
I'm using Node 6.4.1 and Ionic CLI 4.10.3
Does the official tutorial missing something?
I had the same issue. In fact, with the default project, you have to copy the cordova assets to prepare the native build for mobile.
You can find more info here : Ionic documentation
Try this :
ionic cordova prepare
And then go again with :
ionic serve --devapp
The accepted answer is 100% correct .
But the reason why this occurred for me was that somehow the default was capacitor and not cordova.
so first i ran
ionic integrations disable capacitor
then ran
ionic cordova prepare
which solved my issue
I'm trying install .APK in my divece but I get the following error "app was not installed", I'm using ionic v 4 and my divece is android 6.0.1, any idea ?
Use this command for V4 :
ionic cordova build --release android
This will generate unsigned apk file under
platforms/android/build/outputs/apk/your-project-name.apk
And simply download apk file to your phone and install it. More details can be found here
I faced this error before and the cause was that using unsigned APK or the device contains app with same "App Id"
So to Solve it, Please Follow this instructions:
Use this Command
ionic cordova build android --prod
Then Try to remove any other apps from your phone that may have same app id (any old versions or sample apps) or change your app id from config.xml (before build of course)
<widget id="com.android.YOUR_UNIQE_APP_ID" ... >
I am trying to add the plugin: cordova-plugin-facebook4 in my application with the ionic cordova plugin add command cordova-plugin-facebook4 - variable APP_ID =" 092809180912829 "--various APP_NAME =" test "
But whenever I install the plugin and useionic cordova build android`
I receive:
[ERROR] An error occurred while running subprocess cordova.
But if I remove the plugin, works perfectly build and run android.
I'm using ionic 4.3.0 / Cordova CLI 7.0.0 / Cordova platform: 7.0.0
Can anyone tell me what it can be? I found a lot on the internet, but none of the solutions worked for me and I no longer know what it can be. thanks
You can install the ionic-native facebook wrapper.
npm install #ionic-native/facebook#beta
and follow the instructions on Ionic-native facebook
I'm trying to install my ionic app on my android phone. I tried
install my ionic app on my android phone
The app ran on my phone, but when I ran the same command to run a different app, the app was replaced on my mobile. How can I keep both? I don't intend to modify any of these apps, they are ready. I tried these commands as well:
ionic cordova build android --prod --release
and
ionic cordova run android --prod --release
I got this error message:
[ERROR] An error occurred while running cordova run android --release
(exit code 1)
By default, it will overwrite the previous version. You can keep the both app using below way:
Check the config.xml file, and change the id of the app.
<widget id="new.app.id" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
Now, it will be considered as a different app and will not replace the previous one.
I'm starting to learn Ionic2, I have created a new project with ionic start myproject --v2 and everything works correctly if I do ionic serve.
The build folder is missing in ionic 2 project folder.
Whenever I am trying to download any existing Ionic2 template in that one also build folder missing.
ionic -v 2.0.0-beta.30
cordova -v 6.2.0
node -v v6.2.1
npm -v 3.9.5
your ionic serve build is under www. The native builds ( from ionic build) are under platform.
A little late but I had the same issue and was able to fix it by installing Gulp :
npm install -g gulp
Then I did gulp build.
This solved my issues and generated the build folder as it was supposed to.
First you need to add support for the platform/s you are working with, by executing from Ionic CLI console:
ionic platform add android
or
ionic platform add ios
And then you should build your project by executing:
ionic build android
or
ionic build ios