Ionic run / build not working - ionic-framework

when execute "ionic run android " nothing happens !!!
No Errors, No Messages - what happens?

I had the same issue, dropping my version of Node to 4.2.1 fixed it.
See: Ionic run does nothing

I thing the steps below can help, at least you can get a better log, to solve your problem:
Make sure you added a platform to your project
$ ionic platform add android
Once you have a platform try to run using cordova
$ cd {YOUR_PROJECT_DIR}/platforms/android/cordova
$./run

i just got in same kind..!
so,just check setup with ionic info command
Your system information:
Cordova CLI: 5.4.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.7.12
Ionic App Lib Version: 0.6.5
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.2 LTS
Node Version: v5.4.0
i just upgrade cordova version to 5.4.1
this setup,worked for me..!

fix is here (FOR WINDOWS ONLY)
I am facing the same problem of Build then i finally found out the solution.
SOLUTION
So You must have the Android Api 23 in order for this command to work.
Error of Daemon process will be solve after installing the Api 23 and extra build tools and run command
COMMAND : cordova build android --release
I am sure this fix would help you to solve the problem.
STEPS
1. First check the version of android through this COMMAND:
cordova platform help
2. Run the build command after installing the Api 23 and extra build tools.
3. If Even this not work then Try add the variable in the
Environment variables > System variables >
add _JAVA_OPTIONS and value = -Xmx512M
Then Run cordova build android --release
BUT FIRSTLY SET UP THE ENVIRONMENT VARIABLES
Environment Variable setup Image
android API 23
COPY FROM HERE
ENVIRONMENT VARIABLES:-
USER VARIABLES
PATH
C:\Ruby23\bin;C:\Users\kumar\AppData\Roaming\npm;C:\ANDROID_SDK\tools;%SystemRo
ot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;
SYSTEM VARIABLES
ADD NAME AND VALUE
2.1 _JAVA_OPTIONS -Xmx512M
2.2 ANDROID_HOME C:\ANDROID_SDK
2.3 PATH ->
C:\ProgramFiles\Java\jdk1.8.0_60\bin;C:\ProgramFiles\nodejs;C:\Gradle\gradle-4.0\bin;C:\ANDROID_SDK\tools;%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;%SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem;

Related

ionic info command exits without any error

I got a new laptop and I installed node, ionic and angular. I added ANDROID_SDK_HOME, ANDROID_HOME and JAVA_HOME in environment. ionic version is 6.20.2, node version is v16.17.1 and angular version is 14.2.4 and npm version is 8.15.0. When I use ionic serve, application opens in browser. But when I use ionic info, it exits without any error. Same happens when I try ionic cap build android.
I had a similar error when generating the build for Android, the command ended without any error message or warning.
After many tests it was only solved by downgrading.
npm install --global #ionic/cli#6.20.1

Flutter on a MacBook M1: Unable to get flutterfire_cli to work while setting up a Web App

I'm VERY new to the Mac OS (I'm running macOS Monterey v12.4) on an M1 Macbook Pro.
I have Flutter installed and have built a few sandbox apps with this framework.
I'm trying to build a web application with Flutter and Cloud Firestore and thought it best to use the flutterfire_cli to do some of the configurations but I'm stuck trying to run a specific setup command.
The command that I'm trying to run is "dart pub global activate flutterfire_cli" from a terminal. The output that I get is the following when I run this (the error is at the bottom):
ansi_styles 0.3.2+1s...
args 2.3.1
async 2.9.0
ci 0.1.0
cli_util 0.3.5
collection 1.16.0
dart_console 1.0.0
deep_pick 0.10.0
ffi 1.2.1 (2.0.0 available)
file 6.1.2
flutterfire_cli 0.2.2+2
http 0.13.4
http_parser 4.0.1
interact 2.1.1
json_annotation 4.5.0
matcher 0.12.11
meta 1.8.0
path 1.8.2
petitparser 5.0.0
platform 3.1.0
process 4.2.4
pub_semver 2.1.1
pub_updater 0.2.2
pubspec 2.2.0
quiver 3.1.0
source_span 1.9.0
stack_trace 1.10.0
string_scanner 1.1.1
term_glyph 1.2.0
tint 2.0.0
typed_data 1.3.1
uri 1.0.0
win32 2.6.1 (2.7.0 available)
xml 5.4.1 (6.1.0 available)
yaml 3.1.1
Could not find a file named "pubspec.yaml" in "/Users/myusername/.pub-cache/hosted/pub.dartlang.org/flutterfire_cli-0.2.2+2".
When I try to run the next command according to the documentation here: https://firebase.google.com/docs/flutter/setup?platform=web
That command is "flutterfire configure" from within Android studio
I get the following error: "zsh: command not found: flutterfire"
I'm running node version "v16.15.1" and nvm version "0.39.1" with npm version "8.12.1"
Has anyone run into this?
Thanks!
In your termianl run:
export PATH="$PATH":"$HOME/.pub-cache/bin"
Then try to use flutterfire command in your project directory.
Thanks for that response shuster.
I'm afraid that my environment needed abit more help as there were errors when running several commands. I'll outline the steps I used below to finally get this working.
Steps to resolve the issue
Delete Node and NPM (aka - fresh start)
This post here outlined a straightforward way to do this: https://www.positronx.io/how-to-uninstall-node-js-and-npm-from-macos/
Reinstall node WITHOUT using the 'sudo' command using NVM
Verify that all versions are in place and working for NVM, NODE and NPM - all good
Was still getting issues with the command from Dart to activate the flutterfire_cli "dart pub global activate flutterfire_cli"
I didn't capture the exact error, but there was a complaint about a PUBSPEC.YAML missing
I suspected that something was wrong with my Dart installation or cache, so I decided to try clearing the cache
Repairing the cache using this command "dart pub cache repair" produced a "permissions denied" error on the .pub-cache folder
Cleaning the DART cache using this command "dart pub cache clean" produced the same "permissions denied" error on the same folder
So, I went in and deleted everything in that .pub-cache folder manually
I then went back to the terminal and ran the command "dart pub global activate flutterfire_cli" to try and get Dart into a better place
This worked but I got an error message (basically) stating that the path was wrong for a global command and I needed to run "export PATH="$PATH":"$HOME/.pub-cache/bin"
If I ran that PATH command from the terminal, then the Flutterfire CLI would work for that session only but not work in my IDE (Android Studio) unless I ran that same command again inside the IDE
At this point I knew I was very close and needed to figure out how to get this Mac to keep that setting all the time
After some digging into what this "zsh" thing was, I found a post that explained it very well and was able to make the change permanent https://wpbeaches.com/how-to-add-to-the-shell-path-in-macos-using-terminal/
 
Hope this helps someone - happy coding!

Ionic Live Reload not working

Live Reload has stopped working.
When I save code changes, the browser automatically refreshes, but code changes are not reflected. I need to stop my CLI and run ionic serve again in order to have any code changes reflected in the browser.
Your system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.9
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.9.4
Xcode version: Xcode 8.2.1 Build version 8C1002
I think your problem is with your current project.So please create a new project like below.
ionic start myfirstapp blank --v2
After that see whether live reload is working or not.It should work now.
ionic serve
Note: If above one is working then you can copy/ paste your previous project's custom items where you have created to this project.Hope that solution will be much quicker than try to find a solution with the old project.That is my idea.
I did these to resolve this error on my ubuntu
Remove the npm_folder and package-lock.json files
Run npm install --save-dev
Restart your system

if i update cordova to a newer version is it necessary to update ionic and all other plugins? how does the changes effect?

I have updated cordova and all other plugins. When I tried generating apk, its showing
"doesnot have required environment or OS to install"
I am not able figure out where the problem is.
this is version info of my app..
Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.0.0
Ionic CLI Version: 1.7.7
Ionic App Lib Version: 0.6.3
OS: Windows 7
Node Version: v0.12.7
Did you tried removing Android platform?
ionic platform remove android
and then add it again:
ionic platform add android
or maybe this can be useful:
Cordova / Ionic build error (sometimes): don't have required environment

Missing ionic.project file

I just updated nodejs ionic and cordova. Create new ionic project as before:
ionic start myApp blank
In terminal, go to myApp directory, and input:
ionic state
I got message:
You cannot run any state commands on a project that is not an Ionic
project. Try adding an ionic.project file or running ionic start to
get an application to save or restore (CLI v1.7.10)
My system information:
Cordova CLI: 5.4.0
Ionic Version: 1.1.1
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: 1.8.3
ios-sim version: 5.0.4
OS: Mac OS X El Capitan
Node Version: v5.1.0
Xcode version: Xcode 7.1.1 Build version 7B1005
Question: Where ionic.project file, I don't remember there was this file in project before. How to add ionic.project file?
How do I find this problem? Because I check out source from git, I try to use ionic state restore command to restore application for building. But I got same message, missing ioinc.project. So I create a new ionic project to find reason, but I'm still confused.
If use
ionic start
You will got
Invalid command (CLI v1.7.10)
Of course, there is not directory argument for this command. If you give directory as ./, this command only create and overwrite all project file.
screen shot
The new name of this file is ionic.config.json
I was facing the same issue.
just run the command
ionic serve
ionic.project file gets auto generated
EDIT
ionic.project is replace by ionic.config.json. So you should change in ionic.config.json
If you are happened to use ionic#beta, it won't install it until you downgrade it to ionic V1 then "ionic setup sass" or "ionic serve".
Most simple/easy solution to this problem to install a chrome extension named CORS. and everything will work perfectly.