{"id":666,"date":"2017-12-16T09:47:47","date_gmt":"2017-12-16T09:47:47","guid":{"rendered":"http:\/\/www.netexl.com\/blog\/?p=666"},"modified":"2026-04-02T10:11:20","modified_gmt":"2026-04-02T10:11:20","slug":"path-must-be-a-string-received-undefined","status":"publish","type":"post","link":"https:\/\/www.netexl.com\/blog\/path-must-be-a-string-received-undefined\/","title":{"rendered":"Path must be a string. Received undefined"},"content":{"rendered":"<p>It has been a couple months since I last used Intel XDK and a lot has changed since. I just tried to compile a demo HTML5 + Cordova Android app which was exported using\u00a0Intel XDK version 3987 and got the following error while trying to add android platform\u00a0to the app using cordova command line. To see how\u00a0compiling is done, check this <a href=\"https:\/\/www.netexl.com\/blog\/compile-phaser-games-or-any-other-html5-game-as-android-store-app-using-intel-xdk-part-1\/\" target=\"_blank\">blog post<\/a>.<\/p>\n<blockquote><p>Discovered plugin &#8220;cordova-plugin-whitelist&#8221; in config.xml. Adding it to the project<br \/>\nInstalling &#8220;cordova-plugin-whitelist&#8221; for android<\/p>\n<p>This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.<\/p>\n<p>Saved plugin info for &#8220;cordova-plugin-whitelist&#8221; to config.xml<br \/>\nError: Path must be a string. Received undefined<\/p><\/blockquote>\n<p>After this error you wont be able to compile the APK. Some research on google got me to this thread which eventually worked.<\/p>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/46730465\/can-not-add-cordova-platform-on-cordova-7-1-0-path-must-be-a-string\" target=\"_blank\">https:\/\/stackoverflow.com\/questions\/46730465\/can-not-add-cordova-platform-on-cordova-7-1-0-path-must-be-a-string<\/a><\/p>\n<p>To fix this issue, open config.xml in root folder of exported app and remove the following section<\/p>\n<pre class=\"lang:default decode:true \">&lt;config-file platform=\"android\" parent=\"\/manifest\/application\" mode=\"merge\"&gt; \r\n&lt;activity android:launchMode=\"singleTop\" \/&gt;\r\n&lt;\/config-file&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has been a couple months since I last used Intel XDK and a lot has changed since. I just tried to compile a demo HTML5 + Cordova Android app which was exported using\u00a0Intel XDK version 3987 and got the following error while trying to add android platform\u00a0to the app using cordova command line. To see how\u00a0compiling is done, check this blog post. Discovered plugin &#8220;cordova-plugin-whitelist&#8221; in config.xml. Adding it to the project Installing &#8220;cordova-plugin-whitelist&#8221; for android This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in. Saved plugin info for &#8220;cordova-plugin-whitelist&#8221; to config.xml Error: Path must be a string. Received undefined After this error you wont be able to compile the APK. Some research on google got me to this thread which eventually worked. https:\/\/stackoverflow.com\/questions\/46730465\/can-not-add-cordova-platform-on-cordova-7-1-0-path-must-be-a-string To fix[&#8230;]<\/p>\n","protected":false},"author":5,"featured_media":1540,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,3,13,19],"tags":[],"class_list":["post-666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","category-how-to","category-html5","category-intel-xdk","category-mobile"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/comments?post=666"}],"version-history":[{"count":2,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/666\/revisions"}],"predecessor-version":[{"id":670,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/posts\/666\/revisions\/670"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media\/1540"}],"wp:attachment":[{"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/media?parent=666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/categories?post=666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netexl.com\/blog\/wp-json\/wp\/v2\/tags?post=666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}