Özden Irmak create-android-project.bat not working when paths contain space!
Posts 8
Added by Özden Irmak about 2 years ago

Hello There,

I'm trying to create a project using the bat file and as the paths of android sdk and ndk contains spaces ("Program Files (x86)") the bat file fails. I tried to put the paths inside double quotes at the beginning and end but it's still the same. Any help?

Özden

Zhe Wang RE: create-android-project.bat not working when paths contain space!
Posts 1642
Location Amoy, China
Added by Zhe Wang about 2 years ago

Sorry, we haven't test this situation, it may be a bug here.
I can try to reproduce the bug at next Monday, since the win32 machine with android environment is in the office. I'm working on mac now.

Enjoy Coding, Enjoy Life.

Özden Irmak RE: create-android-project.bat not working when paths contain space!
Posts 8
Added by Özden Irmak about 2 years ago

Thanks, that would be really great. For now, I've copied the android and cocos2d-x source folders into root c: folder and could create the project but that's a temporary solution for now ;).

Minggo Zhang RE: create-android-project.bat not working when paths contain space!
Posts 1641
Added by Minggo Zhang about 2 years ago

Yes, now it can not support space. But I think you'd better to rename the dir name, make it not contain space.

Minggo Zhang RE: create-android-project.bat not working when paths contain space!
Posts 1641
Added by Minggo Zhang about 2 years ago

Ok, I have created #506.

Kent Simon RE: create-android-project.bat not working when paths contain space!
Posts 4
Added by Kent Simon almost 2 years ago

surround the path with quotes, and then wherever the environment variable like "%_ANDROIDTOOLS%" appears take the quotes off.

Enjoy

Emmanuel B. RE: create-android-project.bat not working when paths contain space!
Posts 77
Added by Emmanuel B. almost 2 years ago

I don't think that surrounding the path with quotes works. I just had the same problem and my first thought was to surround the path with quotes, but it didn't work.

What I did was use the alternate name: PROGRA~1

Type: dir /x

That will display the contents of the directory but with alternate names (i.e. filenames with spaces).

Jimmy from JStudio RE: create-android-project.bat not working when paths contain space!
Posts 1
Added by Jimmy from JStudio over 1 year ago

Try adding a "\" (with the quotes) before spaces and special characters like "(" or ")" and many others

So for example, Program Files (x86) would become Program\ Files\ \(x86\)

The path looks weird, but it worked for me


(1-7/7)