I can't run app on Android device it is not giving any error. Here is the output of terminal;
Running app-scripts build: --platform android --target cordova
[13:00:25] build dev started ...
[13:00:25] clean started ...
[13:00:25] clean finished in 24 ms
[13:00:25] copy started ...
[13:00:25] deeplinks started ...
[13:00:25] deeplinks finished in 130 ms
[13:00:25] transpile started ...
[13:00:31] transpile finished in 5.76 s
[13:00:31] preprocess started ...
[13:00:31] preprocess finished in 1 ms
[13:00:31] webpack started ...
[13:00:31] copy finished in 6.35 s
[13:00:41] webpack finished in 10.48 s
[13:00:41] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[13:00:44] sass finished in 2.45 s
[13:00:44] postprocess started ...
[13:00:44] postprocess finished in 19 ms
[13:00:44] lint started ...
[13:00:44] build dev finished in 19.37 s
> cordova run android
Android Studio project detected
ANDROID_HOME=C:\Users\umutg\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk-10
(node:3684) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Requirements check failed for JDK 1.8 or greater
(node:3684) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
I think It does not see device, It does not work on another device or emulator. I create new app for trying it's same.
It's about JDK V 10, I uninstalled it and works fine.
Related
I wanted to build out the web version of my application and fired off the Ionic build --prod command after adding the browser platform.
My Output:
> ionic build --prod
Running app-scripts build: --prod
[09:32:57] build prod started ...
[09:32:57] clean started ...
[09:32:57] clean finished in 58 ms
[09:32:57] copy started ...
[09:32:58] deeplinks started ...
[09:32:58] deeplinks finished in 164 ms
[09:32:58] ngc started ...
[09:33:14] ngc finished in 16.15 s
[09:33:14] preprocess started ...
[09:33:14] preprocess finished in 4 ms
[09:33:14] webpack started ...
[09:33:14] copy finished in 16.98 s
I've let the process sit for at least an hour, but it never progresses. I don't get any error messages, but it never progresses. Any idea how I can get the project to build?
I'm using Ionic CLI 3.20.0 and Angular 5.2.10.
To run or build you have to use
ionic cordova run android --prod --release
or
ionic cordova build android --prod --release
and please refer to the documentation also https://ionicframework.com/docs/intro/deploying/
my emulator stopped working after the most recent update. I am currently using the HAX module to run the emulator.
I cannot seem to find the updater for the Intel module (forgive me, I recently started using Android Studio).
Below is the event log which appears when I try to load the emulator:
23/02/2018
21:28 Platform and Plugin Updates: The following components are ready to update: Android Emulator, Google APIs Intel x86 Atom System Image
21:28 Gradle sync started
21:30 Project setup started
21:38 Gradle sync finished in 9m 17s 764ms
21:38 Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar]
21:38 Gradle build finished in 15s 456ms
21:41 * daemon not running; starting now at tcp:5037
21:41 * daemon started successfully
21:41 Executing tasks: [:app:assembleDebug]
21:41 Emulator: Incompatible HAX module version 3,requires minimum version 4
21:41 Emulator: No accelerator found.
21:41 Emulator: failed to initialize HAX: Invalid argument
21:41 Emulator: Process finished with exit code 0
21:41 Gradle build finished in 5s 978ms
Some help would be greatly appreciated! Also, if you find any more problems which could cause further issues to my program, please do notify me.
I had the same problem. I went to the Intel site (https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm) and downloaded the latest version of HAXM. I then installed it, and the problem went away!
I'm having a serious problem with Android Gradle,
I created a project, and emulated by Android, this is what happened:
commands:
ionic start simple tabs
cd simple
ionic cordova emulate android
is this a normal response, am I doing something wrong here or not?
[19:02:48] build dev finished in 13.28 s
> cordova run android
You have been opted out of telemetry. To change this, run: cordova telemetry on.
Android Studio project detected
ANDROID_HOME=G:\dl\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_162
studio
[19:02:53] lint finished in 4.70 s
Starting a Gradle Daemon (subsequent builds will be faster)
:wrapper
BUILD SUCCESSFUL
in 13s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
Exception in thread "main"
java.lang.NullPointerException
at org.gradle.wrapper.PathAssembler.getDistName(PathAssembler.java:84)
at org.gradle.wrapper.PathAssembler.getDistribution(PathAssembler.java:40)
at org.gradle.wrapper.Install.createDist(Install.java:44)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
(node:2388) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NullPointerException
at org.gradle.wrapper.PathAssembler.getDistName(PathAssembler.java:84)
at org.gradle.wrapper.PathAssembler.getDistribution(PathAssembler.java:40)
at org.gradle.wrapper.Install.createDist(Install.java:44)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
(node:2388) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
I had the same problem. I solved it by adding the variable of the Gradle address to the "path" of the system's variables, in my case: "C: \ Gradle \ gradle-4.9 \ bin"
I create and run an ionic project using
ionic start test1 blank --v2
cd test1
ionic serve
And I get:
[13:48:30] ionic-app-scripts 0.0.42
[13:48:30] watch started ...
[13:48:30] build dev started ...
[13:48:30] clean started ...
[13:48:30] clean finished in 1 ms
[13:48:30] copy started ...
[13:48:30] transpile started ...
[13:48:34] transpile finished in 4.04 s
[13:48:34] webpack started ...
[13:48:34] build dev failed: Cannot find module '../util/Logger'
[13:48:35] copy finished in 4.13 s
[13:48:35] watch ready in 4.14 s
I tried to remove the node-modules directory and make "npm install" to rebuild the modules, but with the same result. (even reinstalled ionic framefork)
I have a Linux Mint 18.
I have walked through the tutorial instructions to set up cordova and ionic. I can successfully run the app in development but get this error when building ios. Any ideas? Tried updating node and cordova.
sudo ionic build ios
Running 'build:before' gulp task before build
[11:16:00] Starting 'clean'...
[11:16:00] Finished 'clean' after 47 ms
[11:16:00] Starting 'build'...
[11:16:00] Starting 'sass'...
[11:16:00] Starting 'html'...
[11:16:00] Starting 'fonts'...
[11:16:00] Starting 'scripts'...
[11:16:00] Finished 'scripts' after 45 ms
[11:16:00] Finished 'html' after 51 ms
[11:16:00] Finished 'fonts' after 54 ms
[11:16:00] Finished 'sass' after 770 ms
[11:16:07] Finished 'build' after 7.18 s
[11:16:07] Starting 'build:before'...
[11:16:07] Finished 'build:before' after 11 μs
• You're trying to build for ios but don't have the platform installed yet.
∆ Installing ios for you.
Installing cordova-plugin-device
Installing cordova-plugin-console
Installing cordova-plugin-whitelist
Installing cordova-plugin-splashscreen
Installing cordova-plugin-statusbar
Installing ionic-plugin-keyboard
Error: Command failed: /bin/sh -c cordova platform add ios
Error: Platform ios already added.
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:821:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:4
69:12)
First of all, it seems you have some issues on ios platform installation, try removing it and adding it back to your development space.
Run command ionic platform remove ios && ionic platform add ios before trying to build for ios.
Second, you need Mac Operating system to build ios apps, as it has dependencies on XCode (A native software) to build.
Third, if you still have the same iussue, then it could be due to a bug discribed here. https://github.com/driftyco/ionic-cli/issues/772
Try sudo npm install -g cordova and rerun the build.
Good luck.