I am trying to set up Cocos2d-x for Android in Windows using python, but my ROOT values give me an error.
我试图用python在Windows中为Android设置Cocos2d-x,但是我的根值给了我一个错误。
My path to my ndk folder is: C:\Users\user\AppData\Local\Android\ndk\android-ndk-r11
我ndk文件夹路径是:C:\Users\user\AppData\Local\Android\ndk\ android-ndk-r11
When I try to run setup.py is asks "Please enter the path of NDK_ROOT: ". I enter in my path to the ndk but it then says: "Error: "ndk folder path here" is not a valid path of NDK_ROOT. Ignoring it.
当我尝试运行设置时。py被请求“请输入NDK_ROOT的路径:”。我进入到ndk的路径中,但它会说:“Error:“ndk文件夹路径”不是NDK_ROOT的有效路径。忽略它。
I have also tried manually entering it in my environmental variables, but it still does not work. What is my error here?
我也曾尝试在我的环境变量中手动输入它,但它仍然不起作用。这里的误差是多少?
My adk folder contains the following:
我的adk文件夹包含以下内容:
- build (folder)
- 构建(文件夹)
- platforms (folder)
- 平台(文件夹)
- prebuilt (folder)
- 预先构建的(文件夹)
- python-packages(folder)
- python包(文件夹)
- sources (folder)
- 来源(文件夹)
- toolchains (folder)
- 工具链(文件夹)
- CHANGELOG.md (md file)
- 更新日志。医学博士(医学文件)
- ndk-build (Windows command script)
- ndk-build(Windows命令脚本)
- source.properties (properties file)
- 源。属性(属性文件)
Edit:
编辑:
I have now gotten the NDK to accept on the build folder in my previous location, but there is still an issue with the NDK when I try to create a project.
我现在已经让NDK在我以前的位置上接受了build文件夹,但是当我尝试创建一个项目时,NDK仍然存在一个问题。
5 个解决方案
#1
2
There are some changes made on the new NDK r11 release and some tools were moved to different folders, I guess cocos2d-x scripts need to be updated to support the latest NDK release. You can wait for a new cocos2d-x release or use the previous NDK (r10e) version.
在新的NDK r11版本上有一些变化,一些工具被转移到不同的文件夹,我想cocos2d-x脚本需要更新以支持最新的NDK版本。您可以等待一个新的cocos2d-x版本或者使用之前的NDK (r10e)版本。
#2
0
I know android studio should set you ndk path in local.properties,there is the setting:
我知道android studio应该在本地设置ndk路径。属性设置:
ndk.dir=C:\android-ndk-r10e sdk.dir=C:\Studio_SDK
ndk。dir = C:\ android-ndk-r10e sdk.dir = C:\ Studio_SDK
#3
0
Try adding a "\" at the end. I know it sounds silly, but I had the same problem when setting up on my MacOs.
尝试在最后添加一个“\”。我知道这听起来很傻,但我在做MacOs的时候遇到了同样的问题。
Beyond that, see if you'll encounter other problems like.... wrong toolchain version when compiling
除此之外,看看你是否还会遇到其他问题编译时错误的工具链版本。
#4
0
I have figured out that at the time of this post, the NDK11 has just been released and the current version of Cocos2dx does not support it. I had to find a download link elsewhere to download an older version.
我已经发现,在这篇文章发布的时候,NDK11刚刚发布,Cocos2dx的当前版本不支持它。我必须找到一个下载链接,下载一个旧版本。
#5
0
if you want to set relative path that work on all other fellow system without changing again and again then set ndk root path in such a way.
如果您想要设置相对路径,在所有其他的系统上工作,而不需要反复更改,那么就以这样的方式设置ndk根路径。
NDK_ROOT="$APP_ROOT/../your ndk name"
NDK_ROOT = " $ APP_ROOT / . ./你ndk名称”
your ndk is placed one directory behind the proj.android file.
您的ndk被放置在proj后面的一个目录中。安卓系统文件。
#1
2
There are some changes made on the new NDK r11 release and some tools were moved to different folders, I guess cocos2d-x scripts need to be updated to support the latest NDK release. You can wait for a new cocos2d-x release or use the previous NDK (r10e) version.
在新的NDK r11版本上有一些变化,一些工具被转移到不同的文件夹,我想cocos2d-x脚本需要更新以支持最新的NDK版本。您可以等待一个新的cocos2d-x版本或者使用之前的NDK (r10e)版本。
#2
0
I know android studio should set you ndk path in local.properties,there is the setting:
我知道android studio应该在本地设置ndk路径。属性设置:
ndk.dir=C:\android-ndk-r10e sdk.dir=C:\Studio_SDK
ndk。dir = C:\ android-ndk-r10e sdk.dir = C:\ Studio_SDK
#3
0
Try adding a "\" at the end. I know it sounds silly, but I had the same problem when setting up on my MacOs.
尝试在最后添加一个“\”。我知道这听起来很傻,但我在做MacOs的时候遇到了同样的问题。
Beyond that, see if you'll encounter other problems like.... wrong toolchain version when compiling
除此之外,看看你是否还会遇到其他问题编译时错误的工具链版本。
#4
0
I have figured out that at the time of this post, the NDK11 has just been released and the current version of Cocos2dx does not support it. I had to find a download link elsewhere to download an older version.
我已经发现,在这篇文章发布的时候,NDK11刚刚发布,Cocos2dx的当前版本不支持它。我必须找到一个下载链接,下载一个旧版本。
#5
0
if you want to set relative path that work on all other fellow system without changing again and again then set ndk root path in such a way.
如果您想要设置相对路径,在所有其他的系统上工作,而不需要反复更改,那么就以这样的方式设置ndk根路径。
NDK_ROOT="$APP_ROOT/../your ndk name"
NDK_ROOT = " $ APP_ROOT / . ./你ndk名称”
your ndk is placed one directory behind the proj.android file.
您的ndk被放置在proj后面的一个目录中。安卓系统文件。