From 9f4190689567e48f16d62440ce18d9978a2ce5b6 Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Tue, 23 Sep 2014 13:21:17 +0400 Subject: [PATCH] CB-6511 Fixes build for android when app name contains unicode characters. github: close #124 --- bin/lib/create.js | 4 +++- package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/lib/create.js b/bin/lib/create.js index f9c42248..c0d0c50f 100755 --- a/bin/lib/create.js +++ b/bin/lib/create.js @@ -210,9 +210,11 @@ exports.createProject = function(project_path, package_name, project_name, proje project_template_dir : path.join(ROOT, 'bin', 'templates', 'project'); - var safe_activity_name = project_name.replace(/\W/g, ''); var package_as_path = package_name.replace(/\./g, path.sep); var activity_dir = path.join(project_path, 'src', package_as_path); + // safe_activity_name is being hardcoded to avoid issues with unicode app name (https://issues.apache.org/jira/browse/CB-6511) + // TODO: provide option to specify activity name via CLI (proposal: https://issues.apache.org/jira/browse/CB-7231) + var safe_activity_name = 'MainActivity'; var activity_path = path.join(activity_dir, safe_activity_name + '.java'); var target_api = check_reqs.get_target(); var manifest_path = path.join(project_path, 'AndroidManifest.xml'); diff --git a/package.json b/package.json index a61927a8..a152ceb6 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ ], "scripts": { "test": "jasmine-node --color spec", - "test-build": "rm -rf \"test create\"; ./bin/create \"test create\" com.test.app Test && \"./test create/cordova/build\" && rm -rf \"test create\"" + "test-build": "rm -rf \"test create\"; ./bin/create \"test create\" com.test.app 応用 && \"./test create/cordova/build\" && rm -rf \"test create\"" }, "author": "Apache Software Foundation", "license": "Apache version 2.0",