Hi all,
my App work fine in browser except google maps and it’s because of running an browser, when I try to execute “ionic cordova run android” there are some errors, I googled for a few days but unfortunately have no result to solve my issue.
Here are some results:
- in response of “ionic serve” command:
$ ionic serve -c
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --consolelogs
--nobrowser - Ctrl+C to cancel
[11:07:29] watch started ...
[11:07:29] build dev started ...
[11:07:29] Proxy added:/InterfaceService => http://192.168.252.29:8000/
[11:07:29] clean started ...
[11:07:29] clean finished in less than 1 ms
[11:07:29] copy started ...
[11:07:29] deeplinks started ...
[11:07:29] deeplinks finished in 125 ms
[11:07:29] transpile started ...
[11:07:35] transpile finished in 6.06 s
[11:07:35] preprocess started ...
[11:07:35] preprocess finished in 16 ms
[11:07:35] webpack started ...
[11:07:36] copy finished in 6.91 s
[11:07:47] webpack finished in 11.41 s
[11:07:47] 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.
[11:07:48] sass finished in 1.19 s
[11:07:48] postprocess started ...
[11:07:48] postprocess finished in less than 1 ms
[11:07:48] lint started ...
[11:07:48] build dev finished in 19.47 s
[11:07:48] watch ready in 19.65 s
[11:07:48] dev server running: http://localhost:8100/
[OK] Development server running!
Local: http://localhost:8100
External: http://172.19.180.17:8100, http://192.168.252.25:8100
DevApp: Symban@8100 on Shokoienia-PC
[11:07:51] console.log: Angular is running in the development mode. Call enableProdMode() to enable the production
mode.
[11:07:51] console.warn: Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to
include cordova.js or run in a device/simulator
[11:07:51] console.warn: Native: tried calling SplashScreen.hide, but Cordova is not available. Make sure to include
cordova.js or run in a device/simulator
[11:07:54] lint finished in 5.55 s
but response of “ionic cordova run android”
$ ionic cordova run android --verbose
[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: 'E:\\projects\\MobileApp\\ionic\\projects\\Symban117\\Symban', local: false, binPath:
'C:\\Users\\shokoienia\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath:
'C:\\Users\\shokoienia\\AppData\\Roaming\\npm\\node_modules\\ionic\\dist\\index.js' }
[DEBUG] New daemon pid: 13240
Running app-scripts build: --platform android --target cordova
[11:08:34] build dev started ...
[11:08:34] clean started ...
[11:08:34] clean finished in less than 1 ms
[11:08:34] copy started ...
[11:08:35] deeplinks started ...
[11:08:35] deeplinks finished in 156 ms
[11:08:35] transpile started ...
[11:08:41] transpile finished in 6.03 s
[11:08:41] preprocess started ...
[11:08:41] preprocess finished in less than 1 ms
[11:08:41] webpack started ...
[11:08:41] copy finished in 7.09 s
[11:08:53] webpack finished in 12.61 s
[11:08:53] 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.
[11:08:55] sass finished in 1.25 s
[11:08:55] postprocess started ...
[11:08:55] postprocess finished in less than 1 ms
[11:08:55] lint started ...
[11:08:55] build dev finished in 20.77 s
> cordova run android
ANDROID_HOME=C:\Users\shokoienia\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_151
Subproject Path: CordovaLib
[11:09:01] lint finished in 6.07 s
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_cqdjzt71hh84h9y9l3p3gvkea.run(E:\Projects\MobileApp\ionic\projects\Symban117\Symban\platforms\android\build.gradle:143)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
[Fatal Error] tbxml-android-.pom:2:10: Already seen doctype.
[Fatal Error] play-services-maps-11.8.0.pom:2:10: Already seen doctype.
[Fatal Error] play-services-location-11.8.0.pom:2:10: Already seen doctype.
[Fatal Error] support-core-utils-24.1.0.pom:2:10: Already seen doctype.
Errors during XML parse:
White spaces are required between publicId and systemId.
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and systemId.
javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 62; White spaces are required between publicId and systemId.]
Additionally, the fallback loader failed to parse the XML.
[Fatal Error] tbxml-android-.pom:2:10: Already seen doctype.
[Fatal Error] play-services-maps-11.8.0.pom:2:10: Already seen doctype.
[Fatal Error] play-services-location-11.8.0.pom:2:10: Already seen doctype.
[Fatal Error] support-core-utils-24.1.0.pom:2:10: Already seen doctype.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
> Could not resolve com.google.android.gms:play-services-maps:11.8.0.
Required by:
project :
> Could not resolve com.google.android.gms:play-services-maps:11.8.0.
> Could not parse POM https://maven.google.com/com/google/android/gms/play-services-maps/11.8.0/play-services-maps-11.8.0.pom
> Already seen doctype.
> Could not resolve com.google.android.gms:play-services-location:11.8.0.
Required by:
project :
> Could not resolve com.google.android.gms:play-services-location:11.8.0.
> Could not parse POM https://maven.google.com/com/google/android/gms/play-services-location/11.8.0/play-services-location-11.8.0.pom
>
BUILD FAILED
Total time: 1 mins 29.142 secs
Already seen doctype.
> Could not resolve com.android.support:support-core-utils:24.1.0.
Required by:
project :
> Could not resolve com.android.support:support-core-utils:24.1.0.
> Could not parse POM https://maven.google.com/com/android/support/support-core-utils/24.1.0/support-core-utils-24.1.0.pom
> Already seen doctype.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
[Fatal Error] tbxml-android-.pom:2:10: Already seen doctype.
[Fatal Error] play-services-maps-11.8.0.pom:2:10: Already seen doctype.
[Fatal Error] play-services-location-11.8.0.pom:2:10: Already seen doctype.
[Fatal Error] support-core-utils-24.1.0.pom:2:10: Already seen doctype.
[Fatal Error] tbxml-android-.pom:2:10: Already seen doctype.
[Fatal Error] play-services-maps-11.8.0.pom:2:10: Already seen doctype.
[Fatal Error] play-services-location-11.8.0.pom:2:10: Already seen doctype.
[Fatal Error] support-core-utils-24.1.0.pom:2:10: Already seen doctype.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
> Could not resolve com.google.android.gms:play-services-maps:11.8.0.
Required by:
project :
> Could not resolve com.google.android.gms:play-services-maps:11.8.0.
> Could not parse POM https://maven.google.com/com/google/android/gms/play-services-maps/11.8.0/play-services-maps-11.8.0.pom
> Already seen doctype.
> Could not resolve com.google.android.gms:play-services-location:11.8.0.
Required by:
project :
> Could not resolve com.google.android.gms:play-services-location:11.8.0.
> Could not parse POM https://maven.google.com/com/google/android/gms/play-services-location/11.8.0/play-services-location-11.8.0.pom
> Already seen doctype.
> Could not resolve com.android.support:support-core-utils:24.1.0.
Required by:
project :
> Could not resolve com.android.support:support-core-utils:24.1.0.
> Could not parse POM https://maven.google.com/com/android/support/support-core-utils/24.1.0/support-core-utils-24.1.0.pom
> Already seen doctype.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] An error occurred while running cordova run android (exit code 1).
[DEBUG] registerShutdownFunction process.exit/normal shutdown
After a week I’m confused and don’t know how can I solve this problem.
Any Ideas?
Thanks in advanced