Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
7.0.0, 7.1.0
-
None
-
None
-
cordova 8.0.8
cordova-android 7.0.0
Description
If you create an Android project with version 7.0.0 or 7.1.0 and create a res directory in platforms/android/res the build fails with a confusing message. Some plugins create this directory and or have instructions are to copy drawables into this directory.
Potential solutions could be
- More descriptive error
- Better detection that is a Android Studio project would allow for better diagnoses of this failure
- Suggest to user to move the drawables to the Android Studio project format indicating the presence of the res directory and the app directory
To reproduce
- cordova create test9 com.Test.Test9
- cordova platform add android
- mkdir -p platforms/android/res/drawable
- cp image.png platforms/android/res/drawable
- cordova build --verbose
The error
Generating platform-specific config.xml from defaults for android at /tmp/test9/platforms/android/res/xml/config.xml
cp: copyFileSync: could not write to dest file (code=ENOENT):/tmp/test9/platforms/android/res/xml/config.xmlMerging project's config.xml into platform-specific android config.xml
Parsing /tmp/test9/platforms/android/res/xml/config.xml failed
(node:20148) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/tmp/test9/platforms/android/res/xml/config.xml'