diff --git a/lib/prepare.js b/lib/prepare.js index a082bf2d84..16f3c1f41f 100644 --- a/lib/prepare.js +++ b/lib/prepare.js @@ -303,7 +303,7 @@ function updateProjectAccordingTo (platformConfig, locations) { events.emit('log', 'Multiple candidate Java files that extend CordovaActivity found. Guessing at the first one, ' + java_files[0]); } - const destFile = java_files[0]; + const destFile = path.normalize(java_files[0]); // if package name has changed, path to MainActivity.java has to track it const newDestFile = path.join(locations.root, 'app', 'src', 'main', 'java', androidPkgName.replace(/\./g, '/'), path.basename(destFile));