Search code examples
androidintellij-ideasdklibgdxubuntu-20.04

Android SDK update for libgdx


Today I try to generate project at libGDX, I installed android sdk via sudo apt-get install android-sdk

When I chose folder with installed android sdk at libGDX, I get this error:

Please update your Android SDK, you need build tools 29.0.3

So, I try to find how to update, but nothing help me. I guess i got sdk version about 25, how to check version also can't find. I use IntelliJ IDEA for developing and not like to install android studio, but if no another way, I will.

P.S. I have limited internet for now. This is the reason to ask Stackoverflow community. And sorry for that question.

Best regards.


Solution

  • There should be cmdline-tools in android sdk folder to download different versions of build tools.

    Or you may download cmdline-tools directly from google (link). For example using curl: curl https://link-to-latest-cmdline-tools --output tools.zip Then unpack it.

    In cmdline-tools there is a bin/sdkmanager. It should allow you to load whatever version of build tools you need (api info). But! I recommend if you downloaded and unpucked cmdline-tools manually, to download cmdline-tools again through sdkmanager to some folder. It will create right folder structure for android SDK else you will see errors trying to download build tools. After that use sdkmanager from that folder to download any version of build tools. Don't forget to add your new android sdk folder as ANDROID_HOME environment variable or something like that to make it visible for libgdx if it is necessary. Hope it is helpful.