Error: Android Pre Dex: Android SDK not specified

I downloaded gdx-setup.jar from the website and I run it as:

java -jar gdx-setup.jar

I select the options I want and create a project for idea (libgdx 1.6.2). When I press the generate button, the tool does not cause any error.

When I run idea 14.1.3 , I go to File> Open ... and select the ipr file generated.

When I try to start the desktop launcher, idea enter the following error to me:

Error:Android Pre Dex: [android] Android SDK is not specified

I tried using various build tools and the android API (most of them give me warnings when I clicked the generate button from gdx-setup.jar ). I use Build tools 20.0.0 and API 20 and with this configuration gdx-setup.jar does not throw me a warning.

I check local.properties of the general project: sdk.dir=/home/XXXX/Escritorio/android-sdk-linux-libgdx/ this is true I check File> project structure ...> SDK> Android SDK and this is also correct: /home/XXXX/Escritorio/android-sdk-linux-libgdx

Any tips?

Thanks.

+6
source share
1 answer

Go to "Project Structure", select "Platform Settings" → SDK (left panel), then add the Android SDK by selecting +. Then, in the Project Settings → Module, select the android module and select the just added Android SDK.

+8
source

Source: https://habr.com/ru/post/989067/


All Articles