cordova-android ./create $( which android ) exited with a 1

落爺英雄遲暮 提交于 2019-12-07 03:37:30

The problem was indeed the PATH variables...

/PATH/TO/android-sdk-maxosx/platform-tools

/PATH/TO/android-sdk-maxosx/tools

removed the macosx from the path name.

Correcting these environment variables in ~/.bash_profile solved this problem.

You should modifying the PATH Environment Variable:

For Ubuntu: $ nano ~/.bashrc

You will now have the Nano text editor enabled on the terminal. Now, at the very top of the file, enter the following:

#AndroidDev PATH
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools

https://help.ubuntu.com/community/AndroidSDK

For Mac OS:

look in your home directory for .bash_profile. Create the .bash_profile file if you don't have one. Look for the PATH environment variable and add the full path to the tools/ directory to the PATH. If you don't see a line setting the PATH, you can add one: export PATH=${PATH}:/tools

https://sites.google.com/site/richgossweiler/home/android-development-notes/installing-the-android-sdk-on-the-mac-os-x

This also happens if the name of the COM_PATH contains an invalid character or does not have 3 namespaces like:

com.example.project

This is probably because of a wrong PATH. You should edit environment variables in ~/.bash_profile. Refer this Blog post for a detailed explanation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!