Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova 8.0.0 & cordova-android 7.0.0 error on install #20

Open
rolinger opened this issue Feb 16, 2018 · 4 comments
Open

Cordova 8.0.0 & cordova-android 7.0.0 error on install #20

rolinger opened this issue Feb 16, 2018 · 4 comments

Comments

@rolinger
Copy link

c:\Users\rolin\dev\myApp>ionic cordova plugin add cordova-dialog-gps
Running app-scripts build: --platform android --target cordova
[22:15:58]  build dev started ...
[22:15:58]  clean started ...
[22:15:58]  clean finished in 7 ms
[22:15:58]  copy started ...
[22:15:58]  deeplinks started ...
[22:15:58]  deeplinks finished in 33 ms
[22:15:58]  transpile started ...
[22:16:02]  transpile finished in 3.71 s
[22:16:02]  preprocess started ...
[22:16:02]  preprocess finished in 2 ms
[22:16:02]  webpack started ...
[22:16:02]  copy finished in 3.98 s
[22:16:09]  webpack finished in 7.39 s
[22:16:09]  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.
[22:16:10]  sass finished in 1.13 s
[22:16:10]  postprocess started ...
[22:16:10]  postprocess finished in 10 ms
[22:16:10]  lint started ...
[22:16:10]  build dev finished in 12.43 s
> cordova build android
cp: copyFileSync: could not write to dest file (code=ENOENT):c:\Users\rolin\dev\myApp\platforms\android\res\xml\config.xml

Parsing c:\Users\rolin\dev\myApp\platforms\android\res\xml\config.xml failed
(node:14060) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open 'c:\Users\rolin\dev\myApp\platforms\android\res\xml\config.xml'

The xml directory wasn't there, so I manually added the it. Then tried again:

Running app-scripts build: --platform android --target cordova
[22:18:28]  build dev started ...
[22:18:28]  clean started ...
[22:18:28]  clean finished in 6 ms
[22:18:28]  copy started ...
[22:18:28]  deeplinks started ...
[22:18:28]  deeplinks finished in 26 ms
[22:18:28]  transpile started ...
[22:18:32]  transpile finished in 3.63 s
[22:18:32]  preprocess started ...
[22:18:32]  preprocess finished in 2 ms
[22:18:32]  webpack started ...
[22:18:32]  copy finished in 3.85 s
[22:18:39]  webpack finished in 7.16 s
[22:18:39]  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.
[22:18:40]  sass finished in 1.06 s
[22:18:40]  postprocess started ...
[22:18:40]  postprocess finished in 9 ms
[22:18:40]  lint started ...
[22:18:40]  build dev finished in 12.02 s
> cordova build android
(node:12136) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open 'c:\Users\rolin\dev\myApp\platforms\android\res\values\strings.xml'
[22:18:43]  lint finished in 3.09 s

The \values\strings.xml directory and file were not there....I created the directory, still got the strings.xml error and then manually created and added that file.

Running app-scripts build: --platform android --target cordova
[22:21:19]  build dev started ...
[22:21:19]  clean started ...
[22:21:19]  clean finished in 6 ms
[22:21:19]  copy started ...
[22:21:19]  deeplinks started ...
[22:21:19]  deeplinks finished in 30 ms
[22:21:19]  transpile started ...
[22:21:23]  transpile finished in 3.51 s
[22:21:23]  preprocess started ...
[22:21:23]  preprocess finished in 1 ms
[22:21:23]  webpack started ...
[22:21:23]  copy finished in 4.01 s
[22:21:30]  webpack finished in 7.34 s
[22:21:30]  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.
[22:21:31]  sass finished in 990 ms
[22:21:31]  postprocess started ...
[22:21:31]  postprocess finished in 9 ms
[22:21:31]  lint started ...
[22:21:31]  build dev finished in 12.03 s
> cordova build android
(node:17852) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unexpected end
Line: 0
Column: 0
Char:
[22:21:34]  lint finished in 3.11 s

Hopefully this is helpful to fixing it....

@rolinger
Copy link
Author

Then when I tried to remove the plugin:

ionic cordova plugin rm cl.rmd.cordova.dialoggps
> cordova plugin remove cl.rmd.cordova.dialoggps --save
Uninstalling cl.rmd.cordova.dialoggps from android

Removing "cl.rmd.cordova.dialoggps"

(node:13184) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code 128
npm ERR! Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
npm ERR! fatal: 'submodule' appears to be a git command, but we were not
npm ERR! able to execute it. Maybe git-submodule is broken?
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\rolin\AppData\Roaming\npm-cache\_logs\2018-02-16T03_47_53_289Z-debug.log

@rolinger
Copy link
Author

something went really wrong...plugin wouldn't uninstall correctly,...tried dropping the platform and re-adding. Nope. Had to blow my whole root project directory away and reinstall everything from scratch.

@rolinger
Copy link
Author

It looks like all the paths have changed.

\platforms\android\assets no longer exists.

Everything is now:
\platforms\android\app\src\main\assets\

This is probably the source of the issue.

@pallikondan
Copy link

Please include this package.json file in your plugin path .. It will solve your issue.

{
"name": "cl.rmd.cordova.dialoggps",
"version": "0.0.2",
"description": "",
"cordova": {
"id": "cl.rmd.cordova.dialoggps",
"platforms": [
"android"
]
},
"repository": {
"type": "git",
"url": "https://github.com/rodrigo-martinezd/cordova-dialog-gps.git"
},
"keywords": [
"ecosystem:cordova",
"cordova-ios",
"dialog",
"gps"
],
"author": "rodrigo-martinezd",
"license": "ISC",
"homepage": "https://github.com/rodrigo-martinezd/cordova-dialog-gps/blob/master/README.md"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants