Changing SDK, ANT and NDK directories for android?

Hi!

I’ve been avoiding the android setup for a while now, and now I kind of require it. I had given it a try initially and set the android sdk and ndk and apache ant file paths in the setup.py process, but I failed and decided to use xcode for now.

However, now I’ve redownloaded the files and made new directories and deleted the old ones.
How do I go about replacing the existing paths?
I reran the ./setup.py and it just skipped the whole process of placing in directories, indicating that the files are already there. but that’s not the case.

I was following the sonar learning (@SonarSystems)videos to guide me through the process.

Any help is appreciated

setup.py merely add the location of these files into your environment variables. To edit them, you just simply need to find these environment variables and edit them. If you are using OSX, these variables are available in ~/.bash_profile

@duracellrabbid

Thank you for your help!
I ended up deleting and remaking the bash_profile file.

Good to hear its going well :smiley:

I am facing same problem but I am using windows7. I can’t find any system variable like ndk, sdk, apache-ant. How can I replace old path by new one.
Thanks.

Does anyone know how to correctly change NDK_ROOT on mac?
I’ve updated .bash_profile with the new ndk path and rebooted.

When I run cocos compile -p android I can see it’s using the updated ndk (I changed from r10 t r9)
running: '/Users/nin/Downloads/android-ndk-r9d/ndk-build

However later in the compilation I get errors like:
/Users/nin/Downloads/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_vector.h:898: error: undefined reference to ‘std::__throw_out_of_range_fmt(char const*, …)’

As you can see somewhere cocos it’s still trying to access r10 even though I have updated NDK_ROOT.

What am I missing?

Changing environment variables:

Mac: http://www.sonarlearning.co.uk/questions.php?question-topic=105
Windows: http://www.sonarlearning.co.uk/questions.php?question-topic=101

Changing environment variables for Mac and Windows:

Mac: http://www.sonarlearning.co.uk/questions.php?question-topic=105
Windows: http://www.sonarlearning.co.uk/questions.php?question-topic=101