I’m new with cocos2dx and I try to install the Android studio setup following the doc. First, like the doc said, i try to complete the Android Command-Line Instructions. Everything goes well until this point :
python2.7 android-build.py -p “android-26” cpp-tests
Building mode: debug
Using Eclipse project : /home/pierre/cocos2d-x-3.15.1/tests/cpp-tests/proj.android
Ant (Eclipse project) is not supported from Android SDK Tools 25.3.0.
Build dynamic library for project [ /home/pierre/cocos2d-x-3.15.1/build/…/tests/cpp-tests ] failed!
I dont know how to fix this because it seems like an incompatibility between SDK tools version and Ant.
So I ignore this and I back to the android studio setup insctruction. I launch Android studio, import the cpp test project and I get this error :
Gradle sync failed: A problem occurred configuring project ‘:CppTests’
Now I totaly stuck here.
I’m under Linux (manjaro, archlinux based) and all the prerequisites are installed and works well.
In Android Studio I have Android 8.0 and 7.1.1, SDK Build-Tools Tools PLatform-Tools 26.
Under Android Studio there is a section with all your “build.gradle” files.
Gradle sync failed: A problem occurred configuring project ‘:CppTests’ cannot possibly all you get. In your Gradle console or “Messages” there should be more details about why “A problem occurred configuring project”
I’m going from the top of my head here as I did not take notes on everything I did to fix the same issue you are facing.
Keep in mind that in my case I did not import cpp-test project. I just opened the android studio project under MyGame/proj.android-studio.
Ok, when I try to install NDK from Android studio SDK manager I get this error :
To install:
NDK (ndk-bundle)
Preparing “Install NDK (revision: 15.1.4119039)”.
Downloading https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
An error occurred while preparing SDK package NDK: Aucun espace disponible sur le périphérique. (= No space available on the device.)
“Install NDK (revision: 15.1.4119039)” failed.
Failed packages:
NDK (ndk-bundle)
But when I check my disk I have a lot of free space. I understand nothing…
Yep, when the NDK is dowloading, then unzipping, my /tmp becomes full and break the process. I have never seen that before. You have an idea about this problem ?
edit: To do this, I have increased my /tmp size with size=8G (this process take 4Go) manually, editing my /etc/fstab and the NBK install worked well. So I removed the line ndk.dir I added before in local.properties.
Thanks for help @rnodal_cocos rnodal_cocos