Hi,
I have an issue with my configuration and the temlpate ion2fullapp.
Everything work good with iOs, the app is deployed, but with Android I have many problems. Since 4/5 days I try many many different things but it blocks at some different points. I think the configuration of my Mac is not good, something block maybe the version of the SDK, the version of the gradle… I don’t know, but if you can help me to resolve this it could be very helpful.
I just created a clean project, to try with your base package :
- Download your package
- Unzip in a folder
- CMD : cd « /go/to/folder » -> OK
- CMD : npm install -> OK
- CMD : ionic serve -> OK
- CMD : ionic cordova run android -> Error (see bellow, if it more helpful for you I can send you a video of the test with a clean package)
---------------------------------- TERMINAL ----------------------------------
Saved plugin info for "cordova-plugin-ionic-webview" to config.xml
--save flag or autosave detected
Saving android@~6.3.0 into config.xml file ...
Running app-scripts build: --platform android --target cordova [20:26:22] build dev started ... [20:26:22] clean started ... [20:26:23] clean finished in 101 ms [20:26:23] copy started ... [20:26:23] deeplinks started ... [20:26:24] deeplinks finished in 674 ms [20:26:24] transpile started ... [20:26:39] transpile finished in 15.49 s [20:26:39] preprocess started ... [20:26:39] preprocess finished in 1 ms [20:26:39] webpack started ... [20:26:49] copy finished in 26.39 s [20:27:08] webpack finished in 29.23 s [20:27:08] 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. [20:27:20] sass finished in 12.16 s [20:27:20] postprocess started ... [20:27:20] postprocess finished in 33 ms [20:27:20] lint started ... [20:27:20] build dev finished in 58.27 s cordova run android Discovered plugin "mx.ferreyra.callnumber" in config.xml. Adding it to the project [20:27:52] lint finished in 31.61 s Plugin "call-number" already installed on android.
ANDROID_HOME=/Users/adrienv/Library/Android/
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
(node:83381) UnhandledPromiseRejectionWarning: Error: spawn EACCES at ChildProcess.spawn (internal/child_process.js:330:11) at Object.exports.spawn (child_process.js:500:9) at Object.exports.spawn (/Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:134:31) at GradleBuilder.runGradleWrapper (/Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/lib/builders/GradleBuilder.js:78:27) at /Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/lib/builders/GradleBuilder.js:177:21 at _fulfilled (/Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/node_modules/q/q.js:854:54) at self.promiseDispatch.done (/Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/node_modules/q/q.js:883:30) at Promise.promise.promiseDispatch (/Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/node_modules/q/q.js:816:13) at /Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/node_modules/q/q.js:570:49 at runSingle (/Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/node_modules/q/q.js:137:13)
(node:83381) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:83381) [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?
MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ echo $ANDROID_HOME /Users/adrienv/Library/Android/
MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ echo $JAVA_HOME
MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/
MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ ionic cordova run android Running app-scripts build: --platform android --target cordova
[20:29:54] build dev started ... [20:29:54] clean started ... [20:29:54] clean finished in 19 ms [20:29:54] copy started ... [20:29:55] deeplinks started ... [20:29:55] deeplinks finished in 641 ms [20:29:55] transpile started ... [20:30:07] transpile finished in 11.85 s [20:30:07] preprocess started ... [20:30:07] preprocess finished in 1 ms [20:30:07] webpack started ...
MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/ MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ ionic cordova run android Running app-scripts build: --platform android --target cordova
[20:30:17] build dev started ... [20:30:17] clean started ... [20:30:17] clean finished in 4 ms [20:30:17] copy started ... [20:30:17] deeplinks started ... [20:30:18] deeplinks finished in 575 ms [20:30:18] transpile started ... [20:30:31] transpile finished in 12.87 s [20:30:31] preprocess started ... [20:30:31] preprocess finished in 1 ms [20:30:31] webpack started ... [20:30:36] copy finished in 19.40 s [20:30:52] webpack finished in 21.62 s [20:30:52] sass started ... Without
fromoption PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to
undefinedto prevent this warning. [20:30:58] sass finished in 5.91 s [20:30:58] postprocess started ... [20:30:58] postprocess finished in 25 ms [20:30:58] lint started ... [20:30:58] build dev finished in 41.40 s
cordova run android Discovered plugin "mx.ferreyra.callnumber" in config.xml. Adding it to the project
[20:31:15] lint finished in 16.32 s Plugin "call-number" already installed on android. (node:83411) UnhandledPromiseRejectionWarning: CordovaError: Failed to run "javac -version", make sure that you have a JDK installed. You can get it from: http://www.oracle.com/technetwork/java/javase/downloads. Your JAVA_HOME is invalid: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/ at /Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/lib/check_reqs.js:47:27 at ChildProcess.exithandler (child_process.js:280:5) at ChildProcess.emit (events.js:180:13) at maybeClose (internal/child_process.js:936:16) at Socket.stream.socket.on (internal/child_process.js:353:11) at Socket.emit (events.js:180:13) at Pipe._handle.close [as _onclose] (net.js:538:12) (node:83411) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:83411) [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?
MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/ MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/ MacBook-Air-de-Adrien:ion2FullApp-ELITE-version adrienv$ ionic cordova run android Running app-scripts build: --platform android --target cordova [20:33:11] build dev started ... [20:33:11] clean started ... [20:33:11] clean finished in 19 ms [20:33:11] copy started ... [20:33:11] deeplinks started ... [20:33:12] deeplinks finished in 557 ms [20:33:12] transpile started ... [20:33:22] transpile finished in 10.71 s [20:33:22] preprocess started ... [20:33:22] preprocess finished in 1 ms [20:33:22] webpack started ... [20:33:25] copy finished in 14.51 s [20:33:42] webpack finished in 19.89 s [20:33:42] 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. [20:33:48] sass finished in 5.57 s [20:33:48] postprocess started ... [20:33:48] postprocess finished in 20 ms [20:33:48] lint started ... [20:33:48] build dev finished in 37.15 s cordova run android Discovered plugin "mx.ferreyra.callnumber" in config.xml. Adding it to the project
[20:34:02] lint finished in 14.12 s Plugin "call-number" already installed on android.
(node:83432) UnhandledPromiseRejectionWarning: CordovaError: Failed to run "javac -version", make sure that you have a JDK installed. You can get it from: http://www.oracle.com/technetwork/java/javase/downloads. Your JAVA_HOME is invalid: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/ at /Users/adrienv/NoiCloud/example/ion2FullApp-ELITE-version/platforms/android/cordova/lib/check_reqs.js:47:27 at ChildProcess.exithandler (child_process.js:280:5) at ChildProcess.emit (events.js:180:13) at maybeClose (internal/child_process.js:936:16) at Socket.stream.socket.on (internal/child_process.js:353:11) at Socket.emit (events.js:180:13) at Pipe._handle.close [as _onclose] (net.js:538:12) (node:83432) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:83432) [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?
[OK] Your app has been deployed.
---------------------------------- END TERMINAL ----------------------------------
The prompt say : « Your app has been deployed », but it’s not deployed on my phone (configured on android studio)
If I try to open the project in android studio and build, I got many errors too.
One more time, it’s with a clean package, just downloaded, without any modification. I know your package work, but something in my configuration seems to be bad I think.
Thank so much for your help.