Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder

Jaime Montoya :

When I try to run my Android project on Eclipse ADT, I see this in the Console:

[2017-03-24 15:34:41 - Dex Loader] Failed to load C:\Users\jaimemontoya\android-sdks\build-tools\26.0.0-preview\lib\dx.jar

[2017-03-24 15:34:41 - CouponClub] Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!

enter image description here

I am using Eclipse Neon.2 Release (4.6.2):

enter image description here

This is the package configuration I have as seen from the Android SDK Manager:

enter image description here

What I understand from that error is that it failed to load dx.jar because it is trying to load it "from the SDK folder". The message even uses an exclamation mark to say that! What SDK folder is it referring to? I thought in this case "C:\Users\jaimemontoya\android-sdks" would be considered an SDK folder. Do you know where it is expecting to find the "dx.jar" file?

Jaime Montoya :

Reading the accepted answer at Got "unsupported class file version 52.0" after including a module to a project gave me the hint I needed to find the solution.

I ended up with this Android SDK installation:

enter image description here

Then I switched from "jre1.8.0_121" to "jre7", and also changed my Compiler compliance level from "1.8" to "1.7":

enter image description here

enter image description here

My App finally compiled successfully.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=420169&siteId=1